Author: dazarov
Date: 2008-09-26 08:08:30 -0400 (Fri, 26 Sep 2008)
New Revision: 10499
Added:
trunk/seam/plugins/org.jboss.tools.seam.ui.pages/resources/org/jboss/tools/seam/ui/pages/editor/icons/ico_cross.gif
Modified:
trunk/seam/plugins/org.jboss.tools.seam.ui.pages/images/xstudio/editors/seam-pages.gif
trunk/seam/plugins/org.jboss.tools.seam.ui.pages/src/org/jboss/tools/seam/ui/pages/editor/edit/LinkEditPart.java
trunk/seam/plugins/org.jboss.tools.seam.ui.pages/src/org/jboss/tools/seam/ui/pages/editor/edit/ParamListEditPart.java
trunk/seam/plugins/org.jboss.tools.seam.ui.pages/src/org/jboss/tools/seam/ui/pages/editor/figures/ExceptionFigure.java
trunk/seam/plugins/org.jboss.tools.seam.ui.pages/src/org/jboss/tools/seam/ui/pages/editor/figures/NodeFigure.java
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/ParamFigure.java
trunk/seam/plugins/org.jboss.tools.seam.ui.pages/src/org/jboss/tools/seam/ui/pages/editor/figures/ParamListLayout.java
Log:
https://jira.jboss.org/jira/browse/JBIDE-2254
fine diagram tuning
Modified:
trunk/seam/plugins/org.jboss.tools.seam.ui.pages/images/xstudio/editors/seam-pages.gif
===================================================================
(Binary files differ)
Added:
trunk/seam/plugins/org.jboss.tools.seam.ui.pages/resources/org/jboss/tools/seam/ui/pages/editor/icons/ico_cross.gif
===================================================================
(Binary files differ)
Property changes on:
trunk/seam/plugins/org.jboss.tools.seam.ui.pages/resources/org/jboss/tools/seam/ui/pages/editor/icons/ico_cross.gif
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
Modified:
trunk/seam/plugins/org.jboss.tools.seam.ui.pages/src/org/jboss/tools/seam/ui/pages/editor/edit/LinkEditPart.java
===================================================================
---
trunk/seam/plugins/org.jboss.tools.seam.ui.pages/src/org/jboss/tools/seam/ui/pages/editor/edit/LinkEditPart.java 2008-09-26
11:42:12 UTC (rev 10498)
+++
trunk/seam/plugins/org.jboss.tools.seam.ui.pages/src/org/jboss/tools/seam/ui/pages/editor/edit/LinkEditPart.java 2008-09-26
12:08:30 UTC (rev 10499)
@@ -27,17 +27,16 @@
import org.eclipse.gef.EditPolicy;
import org.eclipse.gef.Request;
import org.eclipse.gef.RequestConstants;
-import org.eclipse.gef.SelectionManager;
import org.eclipse.gef.editparts.AbstractConnectionEditPart;
import org.eclipse.jface.resource.ImageDescriptor;
-import org.eclipse.jface.viewers.ISelectionProvider;
import org.eclipse.jface.viewers.StructuredSelection;
+import org.eclipse.swt.SWT;
import org.eclipse.swt.accessibility.AccessibleEvent;
+import org.eclipse.swt.graphics.Font;
import org.eclipse.swt.graphics.Image;
import org.jboss.tools.common.gef.edit.GEFRootEditPart;
import org.jboss.tools.common.gef.figures.GEFLabel;
import org.jboss.tools.common.gef.figures.xpl.CustomLocator;
-import org.jboss.tools.common.model.XModelObject;
import org.jboss.tools.seam.ui.pages.editor.PagesEditor;
import org.jboss.tools.seam.ui.pages.editor.PagesEditor.ModelSelectionProvider;
import org.jboss.tools.seam.ui.pages.editor.ecore.pages.Link;
@@ -48,8 +47,10 @@
public class LinkEditPart extends AbstractConnectionEditPart implements
PropertyChangeListener, EditPartListener {
- public static final Image icon = ImageDescriptor.createFromFile(
+ private static final Image icon = ImageDescriptor.createFromFile(
PagesEditor.class, "icons/shortcut.gif").createImage();
+
+ private static final Font pathFont = new Font(null, "default", 8, SWT.NONE);
AccessibleEditPart acc;
@@ -119,8 +120,7 @@
pathLabel = new GEFLabel(getLink().getName(),
FigureFactory.normalColor);
-// pathLabel.setFont(getLink().getJSFModel().getOptions()
-// .getLinkPathFont());
+ pathLabel.setFont(pathFont);
pathLabel.setIcon(null);
pathLabel.setTextAlignment(Label.LEFT);
pathLabel.setLabelAlignment(Label.LEFT);
Modified:
trunk/seam/plugins/org.jboss.tools.seam.ui.pages/src/org/jboss/tools/seam/ui/pages/editor/edit/ParamListEditPart.java
===================================================================
---
trunk/seam/plugins/org.jboss.tools.seam.ui.pages/src/org/jboss/tools/seam/ui/pages/editor/edit/ParamListEditPart.java 2008-09-26
11:42:12 UTC (rev 10498)
+++
trunk/seam/plugins/org.jboss.tools.seam.ui.pages/src/org/jboss/tools/seam/ui/pages/editor/edit/ParamListEditPart.java 2008-09-26
12:08:30 UTC (rev 10499)
@@ -91,7 +91,7 @@
if(links == 0)
links = 1;
loc.y += 25+links*NodeFigure.LINK_HEIGHT;
- size = new Dimension(200, getPageWrapperModel().getPage().getChildren().size()*19);
+ size = new Dimension(200, getPageWrapperModel().getPage().getChildren().size()*19+2);
adjustForGrid(loc);
Rectangle r = new Rectangle(loc, size);
Modified:
trunk/seam/plugins/org.jboss.tools.seam.ui.pages/src/org/jboss/tools/seam/ui/pages/editor/figures/ExceptionFigure.java
===================================================================
---
trunk/seam/plugins/org.jboss.tools.seam.ui.pages/src/org/jboss/tools/seam/ui/pages/editor/figures/ExceptionFigure.java 2008-09-26
11:42:12 UTC (rev 10498)
+++
trunk/seam/plugins/org.jboss.tools.seam.ui.pages/src/org/jboss/tools/seam/ui/pages/editor/figures/ExceptionFigure.java 2008-09-26
12:08:30 UTC (rev 10499)
@@ -118,7 +118,7 @@
if(exc != null){
g.setFont(nodeLabelFont);
- g.drawString(getExceptionReadOnlyLabel(), 27, 1);
+ g.drawString(getExceptionReadOnlyLabel(), 27, 3);
}
Modified:
trunk/seam/plugins/org.jboss.tools.seam.ui.pages/src/org/jboss/tools/seam/ui/pages/editor/figures/NodeFigure.java
===================================================================
---
trunk/seam/plugins/org.jboss.tools.seam.ui.pages/src/org/jboss/tools/seam/ui/pages/editor/figures/NodeFigure.java 2008-09-26
11:42:12 UTC (rev 10498)
+++
trunk/seam/plugins/org.jboss.tools.seam.ui.pages/src/org/jboss/tools/seam/ui/pages/editor/figures/NodeFigure.java 2008-09-26
12:08:30 UTC (rev 10499)
@@ -25,7 +25,7 @@
public final static Color ghostFillColor = new Color(null, 31, 31, 31);
- public static final Font nodeLabelFont = new Font(null, "default", 10,
SWT.BOLD); // TODO: use preference font mechanism for this
+ public static final Font nodeLabelFont = new Font(null, "default", 8,
SWT.BOLD); // TODO: use preference font mechanism for this
public static final Color lightGrayColor = new Color(null, 0xf1, 0xf1, 0xf1);
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-09-26
11:42:12 UTC (rev 10498)
+++
trunk/seam/plugins/org.jboss.tools.seam.ui.pages/src/org/jboss/tools/seam/ui/pages/editor/figures/PageFigure.java 2008-09-26
12:08:30 UTC (rev 10499)
@@ -42,6 +42,8 @@
private static final Color greyForeground = new Color(null, 0x99, 0x95, 0x99);
+ private static final Color borderColor = new Color(null, 0xad, 0xa9, 0xad);
+
private static final Image pageImage = ImageDescriptor.createFromFile(
PagesEditor.class, "icons/ico_page.png").createImage();
@@ -50,6 +52,9 @@
private static final Image minusImage = ImageDescriptor.createFromFile(
PagesEditor.class, "icons/ico_minus.png").createImage();
+
+ private static final Image crossImage = ImageDescriptor.createFromFile(
+ PagesEditor.class, "icons/ico_cross.gif").createImage();
public Page page;
@@ -148,7 +153,7 @@
g.drawImage(pageImage, 1, 1);
if(page != null && page.getData() != null &&
SeamPagesDiagramStructureHelper.instance.isUnconfirmedPage((XModelObject)page.getData())){
- g.drawImage(errorIcon, getInsetX(), getInsetY()+8);
+ g.drawImage(crossImage, getInsetX()-1, getInsetY()+4);
}
if(page != null && page.getName() != null){
@@ -187,16 +192,17 @@
int width = r.width - 1;
int height = r.height - 1;
+ if (page != null)
+ graphics.setForegroundColor(foregroundColor);
+ else
+ graphics.setForegroundColor(greyForeground);
+
// if page has not page element
if(page != null && !page.isConfirmed()){
graphics.setLineDash(new int[]{3,3});
graphics.setLineStyle(SWT.LINE_CUSTOM);
+ graphics.setForegroundColor(borderColor);
}
-
- if (page != null)
- graphics.setForegroundColor(foregroundColor);
- else
- graphics.setForegroundColor(greyForeground);
graphics.drawLine(1, 0, width-1, 0);
graphics.drawLine(0, 1, 0, height - 1);
Modified:
trunk/seam/plugins/org.jboss.tools.seam.ui.pages/src/org/jboss/tools/seam/ui/pages/editor/figures/ParamFigure.java
===================================================================
---
trunk/seam/plugins/org.jboss.tools.seam.ui.pages/src/org/jboss/tools/seam/ui/pages/editor/figures/ParamFigure.java 2008-09-26
11:42:12 UTC (rev 10498)
+++
trunk/seam/plugins/org.jboss.tools.seam.ui.pages/src/org/jboss/tools/seam/ui/pages/editor/figures/ParamFigure.java 2008-09-26
12:08:30 UTC (rev 10499)
@@ -18,6 +18,7 @@
import org.eclipse.gef.EditPart;
import org.eclipse.gef.handles.HandleBounds;
import org.eclipse.swt.SWT;
+import org.eclipse.swt.graphics.Color;
import org.eclipse.swt.graphics.Font;
import org.jboss.tools.seam.ui.pages.editor.ecore.pages.Param;
import org.jboss.tools.seam.ui.pages.editor.edit.ParamEditPart;
@@ -25,9 +26,11 @@
public class ParamFigure extends NodeFigure implements HandleBounds {
private static final Dimension SIZE = new Dimension(56, 100);
- private static final Font nameParamFont = new Font(null, "default", 10,
SWT.BOLD); // TODO: use preference font mechanism for this
+ private static final Font nameParamFont = new Font(null, "default", 8,
SWT.BOLD); // TODO: use preference font mechanism for this
- private static final Font valueParamFont = new Font(null, "default", 10,
SWT.NORMAL); // TODO: use preference font mechanism for this
+ private static final Font valueParamFont = new Font(null, "default", 8,
SWT.NORMAL); // TODO: use preference font mechanism for this
+
+ private static final Color selectionColor = new Color(null, 0x41, 0x77, 0xa0);
public Param param;
@@ -74,11 +77,13 @@
if (editPart.getSelected() == EditPart.SELECTED_PRIMARY
|| editPart.getSelected() == EditPart.SELECTED) {
- g.setBackgroundColor(ColorConstants.white);
+ g.setBackgroundColor(selectionColor);
+ g.setForegroundColor(ColorConstants.white);
g.fillRectangle(1, 1, r.width-2, r.height-2);
} else {
g.setBackgroundColor(lightGrayColor);
+ g.setForegroundColor(ColorConstants.black);
g.fillRectangle(1, 1, r.width-2, r.height-2);
}
String name;
@@ -96,10 +101,10 @@
if(param != null){
g.setFont(nameParamFont);
- g.drawString(name, getTextInset(), 1);
+ g.drawString(name, getTextInset(), 2);
g.setFont(valueParamFont);
- g.drawString(value, getTextWidth()+3*getTextInset(), 1);
+ g.drawString(value, getTextWidth()+3*getTextInset(), 2);
}
Modified:
trunk/seam/plugins/org.jboss.tools.seam.ui.pages/src/org/jboss/tools/seam/ui/pages/editor/figures/ParamListLayout.java
===================================================================
---
trunk/seam/plugins/org.jboss.tools.seam.ui.pages/src/org/jboss/tools/seam/ui/pages/editor/figures/ParamListLayout.java 2008-09-26
11:42:12 UTC (rev 10498)
+++
trunk/seam/plugins/org.jboss.tools.seam.ui.pages/src/org/jboss/tools/seam/ui/pages/editor/figures/ParamListLayout.java 2008-09-26
12:08:30 UTC (rev 10499)
@@ -34,8 +34,8 @@
for (int i = 0; i < container.getChildren().size(); i++) {
IFigure figure = (IFigure) container.getChildren().get(i);
- figure.setLocation(new Point(bounds.x + 5, bounds.y + y));
- figure.setSize(container.getSize().width - 5, 19);
+ figure.setLocation(new Point(bounds.x + 1, bounds.y + y + 1));
+ figure.setSize(container.getSize().width - 2, 19);
y += 19;
}
}