Author: dazarov
Date: 2008-09-29 07:06:45 -0400 (Mon, 29 Sep 2008)
New Revision: 10527
Removed:
trunk/seam/plugins/org.jboss.tools.seam.ui.pages/src/org/jboss/tools/seam/ui/pages/editor/figures/PathLabel.java
Modified:
trunk/seam/plugins/org.jboss.tools.seam.ui.pages/src/org/jboss/tools/seam/ui/pages/editor/edit/LinkEditPart.java
Log:
https://jira.jboss.org/jira/browse/JBIDE-2254
fine tuning
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-29
09:45:56 UTC (rev 10526)
+++
trunk/seam/plugins/org.jboss.tools.seam.ui.pages/src/org/jboss/tools/seam/ui/pages/editor/edit/LinkEditPart.java 2008-09-29
11:06:45 UTC (rev 10527)
@@ -35,6 +35,7 @@
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.seam.ui.pages.editor.PagesEditor;
import org.jboss.tools.seam.ui.pages.editor.PagesEditor.ModelSelectionProvider;
@@ -43,7 +44,6 @@
import org.jboss.tools.seam.ui.pages.editor.ecore.pages.PagesElement;
import org.jboss.tools.seam.ui.pages.editor.figures.ConnectionFigure;
import org.jboss.tools.seam.ui.pages.editor.figures.FigureFactory;
-import org.jboss.tools.seam.ui.pages.editor.figures.PathLabel;
public class LinkEditPart extends AbstractConnectionEditPart implements
PropertyChangeListener, EditPartListener {
@@ -60,11 +60,11 @@
private CustomLocator shortcutLocator;
- private PathLabel shortcutLabel;
+ private GEFLabel shortcutLabel;
private CustomLocator pathLocator;
- private PathLabel pathLabel;
+ private GEFLabel pathLabel;
private PageEditPart pagePart = null;
@@ -118,7 +118,7 @@
//conn.repaint();
}
- pathLabel = new PathLabel(getLink().getName());
+ pathLabel = new GEFLabel(getLink().getName(), FigureFactory.normalColor);
pathLabel.setFont(pathFont);
pathLabel.setIcon(null);
pathLabel.setTextAlignment(Label.LEFT);
@@ -135,7 +135,7 @@
if(getLink().getToElement() != null)
text = getLink().getToElement().getName();
- shortcutLabel = new PathLabel(text);
+ shortcutLabel = new GEFLabel(text, FigureFactory.normalColor);
// if (getLink().getJSFModel().getOptions().showShortcutIcon())
shortcutLabel.setIcon(icon);
// shortcutLabel.setFont(getLink().getJSFModel().getOptions()
Deleted:
trunk/seam/plugins/org.jboss.tools.seam.ui.pages/src/org/jboss/tools/seam/ui/pages/editor/figures/PathLabel.java
===================================================================
---
trunk/seam/plugins/org.jboss.tools.seam.ui.pages/src/org/jboss/tools/seam/ui/pages/editor/figures/PathLabel.java 2008-09-29
09:45:56 UTC (rev 10526)
+++
trunk/seam/plugins/org.jboss.tools.seam.ui.pages/src/org/jboss/tools/seam/ui/pages/editor/figures/PathLabel.java 2008-09-29
11:06:45 UTC (rev 10527)
@@ -1,32 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2007 Exadel, Inc. and Red Hat, Inc.
- * Distributed under license by Red Hat, Inc. All rights reserved.
- * This program is made available under the terms of the
- * Eclipse Public License v1.0 which accompanies this distribution,
- * and is available at
http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * Exadel, Inc. and Red Hat, Inc. - initial API and implementation
- ******************************************************************************/
-package org.jboss.tools.seam.ui.pages.editor.figures;
-
-import org.eclipse.draw2d.Graphics;
-import org.eclipse.draw2d.Label;
-import org.eclipse.draw2d.geometry.Rectangle;
-
-public class PathLabel extends Label{
-
- public PathLabel(String name){
- super(name);
- }
-
- protected void paintFigure(Graphics graphics){
- Rectangle bounds = getBounds();
- graphics.translate(bounds.x, bounds.y);
- if(!graphics.getForegroundColor().equals(FigureFactory.selectedColor))
graphics.setForegroundColor(FigureFactory.pathColor);
- if(getIcon()!= null)graphics.drawImage(getIcon(), getIconLocation());
- graphics.drawText(getSubStringText(), getTextLocation());
- graphics.translate(-bounds.x, -bounds.y);
- }
-
-}
\ No newline at end of file