Author: DartPeng
Date: 2010-11-09 15:13:58 -0500 (Tue, 09 Nov 2010)
New Revision: 26394
Modified:
trunk/smooks/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/gef/tree/editpolicy/TreeNodeSelectEditPolicy.java
trunk/smooks/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/graphical/editors/process/ProcessGraphicalViewerLabelProvider.java
trunk/smooks/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/graphical/editors/process/TaskNodeFigure.java
Log:
JBIDE-7510
done
Modified:
trunk/smooks/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/gef/tree/editpolicy/TreeNodeSelectEditPolicy.java
===================================================================
---
trunk/smooks/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/gef/tree/editpolicy/TreeNodeSelectEditPolicy.java 2010-11-09
17:56:17 UTC (rev 26393)
+++
trunk/smooks/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/gef/tree/editpolicy/TreeNodeSelectEditPolicy.java 2010-11-09
20:13:58 UTC (rev 26394)
@@ -50,10 +50,10 @@
* @see org.eclipse.gef.editpolicies.NonResizableEditPolicy#hideFocus()
*/
protected void hideFocus() {
- if(true){
- super.hideFocus();
- return;
- }
+// if(true){
+// super.hideFocus();
+// return;
+// }
if (getTreeNodeFigure() != null) {
getTreeNodeFigure().setFocus(false);
}
@@ -63,10 +63,10 @@
* @see org.eclipse.gef.editpolicies.SelectionHandlesEditPolicy#hideSelection()
*/
protected void hideSelection() {
- if(true){
- super.hideSelection();
- return;
- }
+// if(true){
+// super.hideSelection();
+// return;
+// }
if (getTreeNodeFigure() != null) {
getTreeNodeFigure().setSelected(false);
getTreeNodeFigure().setFocus(false);
@@ -78,10 +78,10 @@
* @see org.eclipse.gef.editpolicies.NonResizableEditPolicy#showFocus()
*/
protected void showFocus() {
- if(true){
- super.showFocus();
- return;
- }
+// if(true){
+// super.showFocus();
+// return;
+// }
if (getTreeNodeFigure() != null) {
getTreeNodeFigure().setFocus(true);
}
@@ -91,10 +91,10 @@
* @see org.eclipse.gef.editpolicies.SelectionHandlesEditPolicy#showSelection()
*/
protected void showPrimarySelection() {
- if(true){
- super.showPrimarySelection();
- return;
- }
+// if(true){
+// super.showPrimarySelection();
+// return;
+// }
if (getTreeNodeFigure() != null) {
getTreeNodeFigure().setSelected(true);
getTreeNodeFigure().setFocus(true);
@@ -105,10 +105,10 @@
* @see org.eclipse.gef.editpolicies.SelectionHandlesEditPolicy#showSelection()
*/
protected void showSelection() {
- if(true){
- super.showSelection();
- return;
- }
+// if(true){
+// super.showSelection();
+// return;
+// }
if (getTreeNodeFigure() != null) {
getTreeNodeFigure().setSelected(true);
getTreeNodeFigure().setFocus(false);
Modified:
trunk/smooks/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/graphical/editors/process/ProcessGraphicalViewerLabelProvider.java
===================================================================
---
trunk/smooks/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/graphical/editors/process/ProcessGraphicalViewerLabelProvider.java 2010-11-09
17:56:17 UTC (rev 26393)
+++
trunk/smooks/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/graphical/editors/process/ProcessGraphicalViewerLabelProvider.java 2010-11-09
20:13:58 UTC (rev 26394)
@@ -13,11 +13,14 @@
import java.util.Iterator;
import java.util.List;
+import org.eclipse.draw2d.ColorConstants;
import org.eclipse.draw2d.IFigure;
import org.eclipse.draw2d.geometry.Dimension;
import org.eclipse.jface.resource.ImageRegistry;
import org.eclipse.jface.viewers.LabelProvider;
+import org.eclipse.swt.graphics.Color;
import org.eclipse.swt.graphics.Image;
+import org.eclipse.zest.core.viewers.IConnectionStyleProvider;
import org.eclipse.zest.core.viewers.IFigureProvider;
import org.eclipse.zest.core.viewers.ISelfStyleProvider;
import org.eclipse.zest.core.widgets.CGraphNode;
@@ -34,7 +37,7 @@
* @author Dart
*
*/
-public class ProcessGraphicalViewerLabelProvider extends LabelProvider implements
IFigureProvider, ISelfStyleProvider {
+public class ProcessGraphicalViewerLabelProvider extends LabelProvider implements
IFigureProvider, ISelfStyleProvider ,IConnectionStyleProvider {
private SmooksProcessGraphicalEditor processEditor;
@@ -94,7 +97,7 @@
}
public void selfStyleConnection(Object element, GraphConnection connection) {
- connection.setLineColor(GraphicsConstants.BORDER_CORLOR);
+// connection.setLineColor(GraphicsConstants.BORDER_CORLOR);
}
private String getProblemMessage(List<String> message){
@@ -137,4 +140,26 @@
}
}
+ public int getConnectionStyle(Object rel) {
+ return 0;
+ }
+
+ public Color getColor(Object rel) {
+ return ColorConstants.black;
+ }
+
+ public Color getHighlightColor(Object rel) {
+ return ColorConstants.black;
+ }
+
+ public int getLineWidth(Object rel) {
+ // TODO Auto-generated method stub
+ return 0;
+ }
+
+ public IFigure getTooltip(Object entity) {
+ // TODO Auto-generated method stub
+ return null;
+ }
+
}
Modified:
trunk/smooks/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/graphical/editors/process/TaskNodeFigure.java
===================================================================
---
trunk/smooks/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/graphical/editors/process/TaskNodeFigure.java 2010-11-09
17:56:17 UTC (rev 26393)
+++
trunk/smooks/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/graphical/editors/process/TaskNodeFigure.java 2010-11-09
20:13:58 UTC (rev 26394)
@@ -16,7 +16,6 @@
import org.eclipse.draw2d.ActionEvent;
import org.eclipse.draw2d.ActionListener;
import org.eclipse.draw2d.Clickable;
-import org.eclipse.draw2d.ColorConstants;
import org.eclipse.draw2d.Figure;
import org.eclipse.draw2d.Graphics;
import org.eclipse.draw2d.GridData;
@@ -31,7 +30,6 @@
import org.eclipse.draw2d.geometry.Rectangle;
import org.eclipse.jface.action.IAction;
import org.eclipse.jface.viewers.StructuredSelection;
-import org.eclipse.swt.SWT;
import org.eclipse.swt.graphics.Color;
import org.eclipse.swt.graphics.Image;
import org.eclipse.swt.widgets.Menu;
@@ -136,9 +134,9 @@
protected void paintBorder(Graphics graphics) {
// super.paintBorder(graphics);
if (showRectangle) {
-// graphics.setLineWidth(2);
- graphics.setForegroundColor(ColorConstants.blue);
- graphics.setLineStyle(SWT.LINE_DOT);
+ graphics.setLineWidth(2);
+// graphics.setForegroundColor(ColorConstants.blue);
+// graphics.setLineStyle(SWT.LINE_DOT);
graphics.drawRectangle(getBounds().x+1,getBounds().y+1,getBounds().width - 2 ,
getBounds().height - 2);
}
}
@@ -301,7 +299,7 @@
mainFigure.add(imageFigure);
label = new Label();
- label.setForegroundColor(GraphicsConstants.BORDER_CORLOR);
+// label.setForegroundColor(GraphicsConstants.BORDER_CORLOR);
label.setText(labelText);
oldLabelColor = label.getForegroundColor();
@@ -345,7 +343,7 @@
public void highlightLabel(Color highlightColor) {
oldLabelColor = label.getForegroundColor();
- label.setForegroundColor(highlightColor);
+// label.setForegroundColor(highlightColor);
showRectangle = true;
this.repaint();
}
Show replies by date