Author: dazarov
Date: 2008-08-18 05:31:37 -0400 (Mon, 18 Aug 2008)
New Revision: 9762
Modified:
trunk/seam/plugins/org.jboss.tools.seam.ui.pages/src/org/jboss/tools/seam/ui/pages/editor/edit/PageEditPart.java
trunk/seam/plugins/org.jboss.tools.seam.ui.pages/src/org/jboss/tools/seam/ui/pages/editor/figures/PageFigure.java
Log:
https://jira.jboss.org/jira/browse/JBIDE-2645
Modified:
trunk/seam/plugins/org.jboss.tools.seam.ui.pages/src/org/jboss/tools/seam/ui/pages/editor/edit/PageEditPart.java
===================================================================
---
trunk/seam/plugins/org.jboss.tools.seam.ui.pages/src/org/jboss/tools/seam/ui/pages/editor/edit/PageEditPart.java 2008-08-18
07:29:09 UTC (rev 9761)
+++
trunk/seam/plugins/org.jboss.tools.seam.ui.pages/src/org/jboss/tools/seam/ui/pages/editor/edit/PageEditPart.java 2008-08-18
09:31:37 UTC (rev 9762)
@@ -179,7 +179,7 @@
protected IFigure createFigure() {
fig = new PageFigure(getPageModel());
- ((PageFigure) fig).setGroupEditPart(this);
+ ((PageFigure) fig).setPageEditPart(this);
return fig;
}
Modified:
trunk/seam/plugins/org.jboss.tools.seam.ui.pages/src/org/jboss/tools/seam/ui/pages/editor/figures/PageFigure.java
===================================================================
---
trunk/seam/plugins/org.jboss.tools.seam.ui.pages/src/org/jboss/tools/seam/ui/pages/editor/figures/PageFigure.java 2008-08-18
07:29:09 UTC (rev 9761)
+++
trunk/seam/plugins/org.jboss.tools.seam.ui.pages/src/org/jboss/tools/seam/ui/pages/editor/figures/PageFigure.java 2008-08-18
09:31:37 UTC (rev 9762)
@@ -37,12 +37,11 @@
public Page page;
-
String path;
PageEditPart editPart;
- public void setGroupEditPart(PageEditPart part) {
+ public void setPageEditPart(PageEditPart part) {
editPart = part;
}
@@ -55,20 +54,20 @@
}
- public PageFigure(Page group) {
- this.page = group;
+ public PageFigure(Page page) {
+ this.page = page;
- if (group != null && group.getData() != null) {
- setIcon(group.getImage());
- initConnectionAnchors(group.getOutputLinks().size());
+ if (page != null && page.getData() != null) {
+ setIcon(page.getImage());
+ initConnectionAnchors(page.getOutputLinks().size());
}
setOpaque(false);
setLayoutManager(new XYLayout());
- setBorder(new GroupBorder(blackColor));
+ setBorder(new PageBorder(blackColor));
- if (group != null) {
+ if (page != null) {
FixedConnectionAnchor c;
c = new FixedConnectionAnchor(this);
c.offsetV = 10;
@@ -127,7 +126,7 @@
}
//color the page
- if (page != null /*&& group.isConfirmed()*/) {
+ if (page != null) {
g.setBackgroundColor(new Color(null, 0xff, 0xff, 0xc2));
} else {
g.setBackgroundColor(lightGrayColor);
@@ -222,8 +221,8 @@
}
/** the one drawing the "bend corner rectangle" **/
- class GroupBorder extends LineBorder {
- public GroupBorder(Color color) {
+ class PageBorder extends LineBorder {
+ public PageBorder(Color color) {
super(color);
}
@@ -233,12 +232,13 @@
int width = r.width - 1;
int height = r.height - 1;
+ // if page has not page element
if(page != null && page.getData() != null && page.getData() instanceof
ReferenceObject && ((ReferenceObject)page.getData()).getReference() == null){
graphics.setLineDash(new int[]{3,3});
graphics.setLineStyle(SWT.LINE_CUSTOM);
}
- if (page != null /*&& group.isConfirmed()*/)
+ if (page != null)
graphics.setForegroundColor(blackColor);
else
graphics.setForegroundColor(darkGrayColor);