Author: DartPeng
Date: 2008-10-20 23:41:10 -0400 (Mon, 20 Oct 2008)
New Revision: 11024
Removed:
branches/jbosstools-3.0.0.Beta1/smooks/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/ui/gef/commands/ChangeConstraintCommand.java
branches/jbosstools-3.0.0.Beta1/smooks/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/ui/gef/editparts/HiddenEditPart.java
branches/jbosstools-3.0.0.Beta1/smooks/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/ui/gef/editparts/StructuredDataContentEditPart.java
branches/jbosstools-3.0.0.Beta1/smooks/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/ui/gef/editparts/StructuredDataEditPart.java
branches/jbosstools-3.0.0.Beta1/smooks/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/ui/gef/figures/ConnectionPointFiguresLocationCaculator.java
branches/jbosstools-3.0.0.Beta1/smooks/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/ui/gef/figures/ContainerBoxFigure.java
branches/jbosstools-3.0.0.Beta1/smooks/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/ui/gef/figures/ContainerFigure.java
branches/jbosstools-3.0.0.Beta1/smooks/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/ui/gef/figures/ContainerLeftEdgeAnchor.java
branches/jbosstools-3.0.0.Beta1/smooks/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/ui/gef/figures/ContainerRightEdgeAnchor.java
branches/jbosstools-3.0.0.Beta1/smooks/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/ui/gef/figures/ExpandableGraphNodeContentFigure.java
branches/jbosstools-3.0.0.Beta1/smooks/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/ui/gef/figures/GraphNodeContentFigure.java
branches/jbosstools-3.0.0.Beta1/smooks/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/ui/gef/figures/GroupFigure.java
branches/jbosstools-3.0.0.Beta1/smooks/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/ui/gef/figures/IExpandable.java
branches/jbosstools-3.0.0.Beta1/smooks/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/ui/gef/figures/ITreeContainer.java
branches/jbosstools-3.0.0.Beta1/smooks/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/ui/gef/figures/IconAreaFigure.java
branches/jbosstools-3.0.0.Beta1/smooks/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/ui/gef/figures/LabelAreaFigure.java
branches/jbosstools-3.0.0.Beta1/smooks/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/ui/gef/figures/RightAlignContainerLayout.java
branches/jbosstools-3.0.0.Beta1/smooks/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/ui/gef/figures/RoundedLineBorder.java
branches/jbosstools-3.0.0.Beta1/smooks/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/ui/gef/figures/SourceConnectionDecoration.java
branches/jbosstools-3.0.0.Beta1/smooks/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/ui/gef/figures/SpacingFigure.java
branches/jbosstools-3.0.0.Beta1/smooks/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/ui/gef/figures/TreeNodeContentFigure.java
branches/jbosstools-3.0.0.Beta1/smooks/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/ui/gef/model/DataObjectContainerModel.java
branches/jbosstools-3.0.0.Beta1/smooks/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/ui/gef/model/HiddenAreaModel.java
branches/jbosstools-3.0.0.Beta1/smooks/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/ui/gef/policy/NodeSelectionHandlesEditPolicyImpl.java
branches/jbosstools-3.0.0.Beta1/smooks/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/ui/gef/util/editparts/
branches/jbosstools-3.0.0.Beta1/smooks/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/ui/gef/util/figures/
Modified:
branches/jbosstools-3.0.0.Beta1/smooks/plugins/org.jboss.tools.smooks.ui/META-INF/MANIFEST.MF
branches/jbosstools-3.0.0.Beta1/smooks/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/ui/gef/commands/CreateStructuredDataModelCommand.java
branches/jbosstools-3.0.0.Beta1/smooks/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/ui/gef/editparts/SmooksEditPartFactory.java
branches/jbosstools-3.0.0.Beta1/smooks/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/ui/gef/policy/RootGraphicsXYLayoutEditPolicy.java
Log:
JBIDE-2942
Delete some needless codes
Modified:
branches/jbosstools-3.0.0.Beta1/smooks/plugins/org.jboss.tools.smooks.ui/META-INF/MANIFEST.MF
===================================================================
---
branches/jbosstools-3.0.0.Beta1/smooks/plugins/org.jboss.tools.smooks.ui/META-INF/MANIFEST.MF 2008-10-20
23:12:16 UTC (rev 11023)
+++
branches/jbosstools-3.0.0.Beta1/smooks/plugins/org.jboss.tools.smooks.ui/META-INF/MANIFEST.MF 2008-10-21
03:41:10 UTC (rev 11024)
@@ -49,8 +49,6 @@
org.jboss.tools.smooks.ui.gef.policy,
org.jboss.tools.smooks.ui.gef.tools,
org.jboss.tools.smooks.ui.gef.util,
- org.jboss.tools.smooks.ui.gef.util.editparts,
- org.jboss.tools.smooks.ui.gef.util.figures,
org.jboss.tools.smooks.ui.modelparser,
org.jboss.tools.smooks.ui.wizards,
org.jboss.tools.smooks.utils,
Deleted:
branches/jbosstools-3.0.0.Beta1/smooks/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/ui/gef/commands/ChangeConstraintCommand.java
===================================================================
---
branches/jbosstools-3.0.0.Beta1/smooks/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/ui/gef/commands/ChangeConstraintCommand.java 2008-10-20
23:12:16 UTC (rev 11023)
+++
branches/jbosstools-3.0.0.Beta1/smooks/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/ui/gef/commands/ChangeConstraintCommand.java 2008-10-21
03:41:10 UTC (rev 11024)
@@ -1,85 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2007 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:
- * Red Hat, Inc. - initial API and implementation
- ******************************************************************************/
-package org.jboss.tools.smooks.ui.gef.commands;
-
-import org.eclipse.draw2d.geometry.Rectangle;
-import org.eclipse.gef.commands.Command;
-import org.jboss.tools.smooks.ui.gef.model.IGraphicalModel;
-
-/**
- * @deprecated
- * @author Dart Peng
- *
- */
-public class ChangeConstraintCommand extends Command {
- Rectangle constraint = null;
-
- IGraphicalModel graphicalModel = null;
-
- /**
- * @return the graphicalModel
- */
- public IGraphicalModel getGraphicalModel() {
- return graphicalModel;
- }
-
- /**
- * @param graphicalModel the graphicalModel to set
- */
- public void setGraphicalModel(IGraphicalModel graphicalModel) {
- this.graphicalModel = graphicalModel;
- }
-
- Rectangle prevConstraint = null;
-
- /**
- * @return the constraint
- */
- public Rectangle getConstraint() {
- return constraint;
- }
-
- /**
- * @param constraint
- * the constraint to set
- */
- public void setConstraint(Rectangle constraint) {
- this.constraint = constraint;
- }
-
- @Override
- public void execute() {
- if (constraint != null && graphicalModel != null) {
- graphicalModel.setConstraint(constraint);
- }
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.gef.commands.Command#redo()
- */
- @Override
- public void redo() {
- // TODO Auto-generated method stub
- super.redo();
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.gef.commands.Command#undo()
- */
- @Override
- public void undo() {
- // TODO Auto-generated method stub
- super.undo();
- }
-
-
-
-}
Modified:
branches/jbosstools-3.0.0.Beta1/smooks/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/ui/gef/commands/CreateStructuredDataModelCommand.java
===================================================================
---
branches/jbosstools-3.0.0.Beta1/smooks/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/ui/gef/commands/CreateStructuredDataModelCommand.java 2008-10-20
23:12:16 UTC (rev 11023)
+++
branches/jbosstools-3.0.0.Beta1/smooks/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/ui/gef/commands/CreateStructuredDataModelCommand.java 2008-10-21
03:41:10 UTC (rev 11024)
@@ -22,6 +22,7 @@
* @author Dart Peng
*
* @CreateTime Jul 22, 2008
+ * @deprecated
*/
public class CreateStructuredDataModelCommand extends Command {
private AbstractStructuredDataModel parent;
Deleted:
branches/jbosstools-3.0.0.Beta1/smooks/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/ui/gef/editparts/HiddenEditPart.java
===================================================================
---
branches/jbosstools-3.0.0.Beta1/smooks/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/ui/gef/editparts/HiddenEditPart.java 2008-10-20
23:12:16 UTC (rev 11023)
+++
branches/jbosstools-3.0.0.Beta1/smooks/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/ui/gef/editparts/HiddenEditPart.java 2008-10-21
03:41:10 UTC (rev 11024)
@@ -1,57 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2007 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:
- * Red Hat, Inc. - initial API and implementation
- ******************************************************************************/
-package org.jboss.tools.smooks.ui.gef.editparts;
-
-import org.eclipse.draw2d.Figure;
-import org.eclipse.draw2d.IFigure;
-import org.eclipse.draw2d.geometry.Dimension;
-import org.eclipse.gef.editparts.AbstractGraphicalEditPart;
-
-/**
- * @author Dart Peng
- *
- */
-public class HiddenEditPart extends AbstractGraphicalEditPart {
-
- /* (non-Javadoc)
- * @see org.eclipse.gef.editparts.AbstractGraphicalEditPart#createFigure()
- */
- @Override
- protected IFigure createFigure() {
- Figure figure = new Figure(){
-
- @Override
- public Dimension getPreferredSize(int hint, int hint2) {
- // TODO Auto-generated method stub
- return new Dimension(200,300);
- }
-
- @Override
- public Dimension getMaximumSize() {
- // TODO Auto-generated method stub
- return new Dimension(100,300);
- }
-
-
-
- };
- return figure;
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.gef.editparts.AbstractEditPart#createEditPolicies()
- */
- @Override
- protected void createEditPolicies() {
-
- }
-
-}
Modified:
branches/jbosstools-3.0.0.Beta1/smooks/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/ui/gef/editparts/SmooksEditPartFactory.java
===================================================================
---
branches/jbosstools-3.0.0.Beta1/smooks/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/ui/gef/editparts/SmooksEditPartFactory.java 2008-10-20
23:12:16 UTC (rev 11023)
+++
branches/jbosstools-3.0.0.Beta1/smooks/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/ui/gef/editparts/SmooksEditPartFactory.java 2008-10-21
03:41:10 UTC (rev 11024)
@@ -3,12 +3,8 @@
import org.eclipse.gef.EditPart;
import org.eclipse.gef.EditPartFactory;
import org.jboss.tools.smooks.ui.gef.model.GraphRootModel;
-import org.jboss.tools.smooks.ui.gef.model.HiddenAreaModel;
import org.jboss.tools.smooks.ui.gef.model.LineConnectionModel;
-import org.jboss.tools.smooks.ui.gef.model.RootModel;
import org.jboss.tools.smooks.ui.gef.model.SourceModel;
-import org.jboss.tools.smooks.ui.gef.model.StructuredDataContentModel;
-import org.jboss.tools.smooks.ui.gef.model.StructuredDataModel;
import org.jboss.tools.smooks.ui.gef.model.TargetModel;
/**
@@ -25,8 +21,9 @@
/*
* (non-Javadoc)
*
- * @see org.eclipse.gef.EditPartFactory#createEditPart(org.eclipse.gef.EditPart,
- * java.lang.Object)
+ * @see
+ * org.eclipse.gef.EditPartFactory#createEditPart(org.eclipse.gef.EditPart,
+ * java.lang.Object)
*/
public EditPart createEditPart(EditPart context, Object model) {
EditPart part = getPartForElement(model);
@@ -43,15 +40,7 @@
*/
private EditPart getPartForElement(Object modelElement) {
- if (modelElement instanceof RootModel) {
- return new RootModelEditPart();
- } else if (modelElement instanceof HiddenAreaModel) {
- return new HiddenEditPart();
- } else if (modelElement instanceof StructuredDataModel) {
- return new StructuredDataEditPart();
- } else if (modelElement instanceof StructuredDataContentModel) {
- return new StructuredDataContentEditPart();
- } else if (modelElement instanceof LineConnectionModel) {
+ if (modelElement instanceof LineConnectionModel) {
return new StructuredDataConnectionEditPart();
} else if (modelElement instanceof GraphRootModel) {
return new RootModelEditPart();
Deleted:
branches/jbosstools-3.0.0.Beta1/smooks/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/ui/gef/editparts/StructuredDataContentEditPart.java
===================================================================
---
branches/jbosstools-3.0.0.Beta1/smooks/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/ui/gef/editparts/StructuredDataContentEditPart.java 2008-10-20
23:12:16 UTC (rev 11023)
+++
branches/jbosstools-3.0.0.Beta1/smooks/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/ui/gef/editparts/StructuredDataContentEditPart.java 2008-10-21
03:41:10 UTC (rev 11024)
@@ -1,267 +0,0 @@
-package org.jboss.tools.smooks.ui.gef.editparts;
-
-import java.beans.PropertyChangeEvent;
-import java.util.Collections;
-import java.util.Iterator;
-import java.util.List;
-
-import org.eclipse.draw2d.ColorConstants;
-import org.eclipse.draw2d.ConnectionAnchor;
-import org.eclipse.draw2d.IFigure;
-import org.eclipse.draw2d.Label;
-import org.eclipse.draw2d.MarginBorder;
-import org.eclipse.draw2d.PositionConstants;
-import org.eclipse.draw2d.RectangleFigure;
-import org.eclipse.draw2d.geometry.Dimension;
-import org.eclipse.draw2d.geometry.Rectangle;
-import org.eclipse.gef.ConnectionEditPart;
-import org.eclipse.gef.EditPart;
-import org.eclipse.gef.EditPolicy;
-import org.eclipse.gef.GraphicalEditPart;
-import org.eclipse.gef.Request;
-import org.eclipse.gef.editparts.AbstractConnectionEditPart;
-import org.eclipse.swt.graphics.Color;
-import org.jboss.tools.smooks.ui.gef.figures.ContainerFigure;
-import org.jboss.tools.smooks.ui.gef.figures.ContainerLeftEdgeAnchor;
-import org.jboss.tools.smooks.ui.gef.figures.ContainerRightEdgeAnchor;
-import org.jboss.tools.smooks.ui.gef.figures.LabelAreaFigure;
-import org.jboss.tools.smooks.ui.gef.figures.TreeNodeContentFigure;
-import org.jboss.tools.smooks.ui.gef.model.AbstractStructuredDataModel;
-import org.jboss.tools.smooks.ui.gef.model.StructuredDataContentModel;
-import org.jboss.tools.smooks.ui.gef.policy.ConnectFeedbackEditPolicy;
-import org.jboss.tools.smooks.ui.gef.policy.CustomGraphicalNodeEditPolicy;
-import org.jboss.tools.smooks.ui.gef.policy.NonResizableSelectionEditPolicy;
-import org.jboss.tools.smooks.ui.gef.util.GraphicsConstants;
-import org.jboss.tools.smooks.ui.gef.util.LeftSourceAnchor;
-import org.jboss.tools.smooks.ui.gef.util.RightSourceAnchor;
-import org.jboss.tools.smooks.ui.gef.util.editparts.InteractorHelper;
-import org.jboss.tools.smooks.ui.gef.util.figures.Interactor;
-import org.jboss.tools.smooks.ui.gef.util.figures.Placeholder;
-
-/**
- *
- * @author Dart Peng
- *
- */
-public class StructuredDataContentEditPart extends
- AbstractStructuredDataEditPart implements GraphicsConstants,
- IConnectableEditPart {
-
- protected static final Color label2ForegroundColor = new Color(null, 82,
- 82, 158);
-
- protected Label propertyName;
- protected Label javaTypeLabel;
- protected ContainerFigure labelHolder = new ContainerFigure();
- protected TreeNodeContentFigure contentFigure;
- protected InteractorHelper interactorHelper;
- protected boolean isExpanded = false;
-
- private EditPart expandPart;
-
- public void propertyChange(PropertyChangeEvent event) {
-
- if (event.getPropertyName().equals(
- StructuredDataContentModel.P_SOURCE_CONNECTION)) {
- refreshSourceConnections();
- } else if (event.getPropertyName().equals(
- StructuredDataContentModel.P_TARGET_CONNECTION)) {
- refreshTargetConnections();
- }
- }
-
- public IFigure getContentPane() {
- return contentFigure.getInnerContentArea();
- }
-
- protected IFigure createFigure() {
- createContentFigure();
- createFigureContent();
- return contentFigure;
- }
-
- protected void createEditPolicies() {
- installEditPolicy(EditPolicy.GRAPHICAL_NODE_ROLE,
- new CustomGraphicalNodeEditPolicy());
- installEditPolicy(EditPolicy.SELECTION_FEEDBACK_ROLE,
- new NonResizableSelectionEditPolicy());
- installEditPolicy("CONNECTION_FEED_BACK", new ConnectFeedbackEditPolicy());
- }
-
- protected void createContentFigure() {
- contentFigure = new TreeNodeContentFigure();
- contentFigure.setFill(true);
- }
-
- protected void createFigureContent() {
-
- StructuredDataContentModel model = (StructuredDataContentModel) getModel();
-
- // add a bit of space between the interactor and icon
- //
-
- RectangleFigure space = new RectangleFigure();
- space.setVisible(false);
- space.setPreferredSize(new Dimension(5, 5));
-
- labelHolder = new LabelAreaFigure();
- labelHolder.setFill(true);
-
- IFigure interactor = null;
-
- if (model.getChildren() != null
- && !model.getChildren().equals(Collections.EMPTY_LIST)) {
-
- interactor = new Interactor();
- interactor.setBorder(new MarginBorder(0, 0, 0, 5));
- interactor.setForegroundColor(ColorConstants.black);
- interactor.setBackgroundColor(ColorConstants.white);
- } else {
- interactor = new Placeholder();
- interactor.setBorder(new MarginBorder(0, 0, 0, 5));
- interactor.setForegroundColor(ColorConstants.white);
- }
-
- // contentFigure.getIconArea().getContainerLayout().setAlign(
- // PositionConstants.RIGHT);
- //contentFigure.getIconArea().getContainerLayout().setHorizontal(false);
- if (!((AbstractStructuredDataModel) getModel()).isLeft()) {
- contentFigure.getIconArea().getContainerLayout().setAlign(
- PositionConstants.RIGHT);
- contentFigure.getIconArea().add(space);
- contentFigure.getIconArea().add(labelHolder);
- contentFigure.setInteractor(interactor);
- } else {
- contentFigure.getIconArea().getContainerLayout().setAlign(
- PositionConstants.LEFT);
- contentFigure.setInteractor(interactor);
- contentFigure.getIconArea().add(space);
- contentFigure.getIconArea().add(labelHolder);
- }
-
- propertyName = new Label(model.getLabelName());
- propertyName.setForegroundColor(ColorConstants.black);
-// propertyName.setTextAlignment(PositionConstants.RIGHT);
- // propertyName.setBackgroundColor(ColorConstants.red);
- // propertyName.setOpaque(true);
-
- // if ( model.isRootNode() ) {
- // propertyName.setIcon(SDPlugin.getImageDescriptor(IImagePaths.
- // IMAGE_XSD_ALL).createImage());
- // } else if ( model.isListType() ) {
- // propertyName.setIcon(SDPlugin.getImageDescriptor(IImagePaths.
- // IMAGE_XSD_CHOICE).createImage());
- // } else if ( !model.isListType() && model.isComplexType() ) {
- // propertyName.setIcon(SDPlugin.getImageDescriptor(IImagePaths.
- // IMAGE_XSD_COMPLEX_TYPE).createImage());
- // } else if ( !model.isListType() && !model.isComplexType() ) {
- // propertyName.setIcon(SDPlugin.getImageDescriptor(IImagePaths.
- // IMAGE_XSD_SIMPLE_TYPE).createImage());
- // }
- // contentFigure.getIconArea().setFill(true);
- // contentFigure.getIconArea().setBackgroundColor(ColorConstants.black);
- labelHolder.add(propertyName);
-
- if (model.getChildren() != null
- && !model.getChildren().equals(Collections.EMPTY_LIST)) {
- interactorHelper = new InteractorHelper(this, contentFigure
- .getInteractor(), contentFigure.getInnerContentArea());
- }
-
- javaTypeLabel = new Label();
- javaTypeLabel.setBorder(new MarginBorder(0, 5, 0, 0));
- javaTypeLabel.setForegroundColor(label2ForegroundColor);
- // javaTypeLabel.setIcon(SDPlugin.getImageDescriptor(
- // "icons/XSDSimpleType.gif").createImage());
-
- if (model.getTypeString() != null) {
- javaTypeLabel.setText("- (" + model.getTypeString() + ")");
- }
- labelHolder.add(javaTypeLabel);
- }
-
- protected void refreshVisuals() {
- Rectangle constraint = ((StructuredDataContentModel) getModel())
- .getConstraint();
-
- ((GraphicalEditPart) getParent()).setLayoutConstraint(this,
- getFigure(), constraint);
-
- super.refreshVisuals();
- }
-
- public void notifyExpand(EditPart part) {
- expandPart = part;
- List sourceConnections = this.getSourceConnections();
- for (Iterator iter = sourceConnections.iterator(); iter.hasNext();) {
- AbstractConnectionEditPart sourceC = (AbstractConnectionEditPart) iter
- .next();
- sourceC.refresh();
- }
- List targetConnections = this.getTargetConnections();
- for (Iterator iter = targetConnections.iterator(); iter.hasNext();) {
- AbstractConnectionEditPart sourceC = (AbstractConnectionEditPart) iter
- .next();
- sourceC.refresh();
- }
-
- }
-
- public IFigure getSelectionFigure() {
- return ((TreeNodeContentFigure) getFigure()).getIconArea();
- }
-
- public IFigure getAnchroFigure() {
- if (expandPart == null)
- return ((TreeNodeContentFigure) getFigure()).getIconArea();
-
- if (expandPart instanceof StructuredDataContentEditPart) {
- IFigure figure = ((StructuredDataContentEditPart) expandPart)
- .getFigure();
- if (figure instanceof TreeNodeContentFigure) {
- return ((TreeNodeContentFigure) figure).getIconArea();
- }
- }
- return ((GraphicalEditPart) expandPart).getFigure();
- }
-
- protected List getModelChildren() {
- return ((AbstractStructuredDataModel) getModel()).getChildren();
- }
-
- public ConnectionAnchor getSourceConnectionAnchor(
- ConnectionEditPart connection) {
- return new ContainerRightEdgeAnchor(getAnchroFigure());
- }
-
- public ConnectionAnchor getTargetConnectionAnchor(
- ConnectionEditPart connection) {
- return new ContainerLeftEdgeAnchor(getAnchroFigure());
- }
-
- public ConnectionAnchor getSourceConnectionAnchor(Request request) {
- return new RightSourceAnchor(getAnchroFigure());
- }
-
- public ConnectionAnchor getTargetConnectionAnchor(Request request) {
- return new LeftSourceAnchor(getAnchroFigure());
- }
-
- public List getModelSourceConnections() {
- return ((StructuredDataContentModel) getModel())
- .getModelSourceConnections();
- }
-
- public List getModelTargetConnections() {
- return ((StructuredDataContentModel) getModel())
- .getModelTargetConnections();
- }
-
- public boolean isExpanded() {
- return isExpanded;
- }
-
- public void setExpanded(boolean isExpanded) {
- this.isExpanded = isExpanded;
- }
-}
\ No newline at end of file
Deleted:
branches/jbosstools-3.0.0.Beta1/smooks/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/ui/gef/editparts/StructuredDataEditPart.java
===================================================================
---
branches/jbosstools-3.0.0.Beta1/smooks/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/ui/gef/editparts/StructuredDataEditPart.java 2008-10-20
23:12:16 UTC (rev 11023)
+++
branches/jbosstools-3.0.0.Beta1/smooks/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/ui/gef/editparts/StructuredDataEditPart.java 2008-10-21
03:41:10 UTC (rev 11024)
@@ -1,274 +0,0 @@
-package org.jboss.tools.smooks.ui.gef.editparts;
-
-import java.beans.PropertyChangeEvent;
-import java.util.List;
-
-import org.eclipse.draw2d.ColorConstants;
-import org.eclipse.draw2d.ConnectionAnchor;
-import org.eclipse.draw2d.Graphics;
-import org.eclipse.draw2d.IFigure;
-import org.eclipse.draw2d.Label;
-import org.eclipse.draw2d.MarginBorder;
-import org.eclipse.draw2d.PositionConstants;
-import org.eclipse.draw2d.RectangleFigure;
-import org.eclipse.draw2d.ScrollPane;
-import org.eclipse.draw2d.Viewport;
-import org.eclipse.draw2d.ViewportLayout;
-import org.eclipse.draw2d.geometry.Dimension;
-import org.eclipse.draw2d.geometry.Rectangle;
-import org.eclipse.gef.ConnectionEditPart;
-import org.eclipse.gef.EditPolicy;
-import org.eclipse.gef.GraphicalEditPart;
-import org.eclipse.gef.Request;
-import org.eclipse.gef.commands.Command;
-import org.eclipse.gef.editpolicies.ContainerEditPolicy;
-import org.eclipse.gef.requests.CreateRequest;
-import org.jboss.tools.smooks.ui.gef.figures.ContainerBoxFigure;
-import org.jboss.tools.smooks.ui.gef.figures.ContainerFigure;
-import org.jboss.tools.smooks.ui.gef.figures.ContainerLeftEdgeAnchor;
-import org.jboss.tools.smooks.ui.gef.figures.ContainerRightEdgeAnchor;
-import org.jboss.tools.smooks.ui.gef.figures.RoundedLineBorder;
-import org.jboss.tools.smooks.ui.gef.model.AbstractStructuredDataModel;
-import org.jboss.tools.smooks.ui.gef.model.IConnectableModel;
-import org.jboss.tools.smooks.ui.gef.model.StructuredDataContentModel;
-import org.jboss.tools.smooks.ui.gef.model.StructuredDataModel;
-import org.jboss.tools.smooks.ui.gef.policy.CustomGraphicalNodeEditPolicy;
-import org.jboss.tools.smooks.ui.gef.util.GraphicsConstants;
-import org.jboss.tools.smooks.ui.gef.util.LeftSourceAnchor;
-import org.jboss.tools.smooks.ui.gef.util.RightSourceAnchor;
-import org.jboss.tools.smooks.ui.gef.util.figures.ContainerLayout;
-import org.jboss.tools.smooks.ui.gef.util.figures.FillLayout;
-
-/**
- *
- */
-public class StructuredDataEditPart extends AbstractStructuredDataEditPart
- implements GraphicsConstants, IConnectableEditPart {
-
- protected ScrollPane scrollpane;
- protected Label label;
- protected ContainerFigure outerPane;
-
- public IFigure getContentPane() {
- return scrollpane.getContents();
- }
-
- /*
- * (non-Javadoc)
- *
- * @seejava.beans.PropertyChangeListener#propertyChange(java.beans.
- * PropertyChangeEvent)
- */
- public void propertyChange(PropertyChangeEvent evt) {
- String pname = evt.getPropertyName();
- if (AbstractStructuredDataModel.P_CHILDREN.equals(pname)) {
- refreshChildren();
- }
- if (AbstractStructuredDataModel.P_BOUNDS_CHANGE.equals(pname)) {
- refresh();
- }
-
- if (StructuredDataContentModel.P_SOURCE_CONNECTION.equals(pname)) {
- refreshSourceConnections();
- } else if (StructuredDataContentModel.P_TARGET_CONNECTION.equals(pname)) {
- refreshTargetConnections();
- }
- }
-
- /*
- * (non-Javadoc)
- *
- * @see org.eclipse.gef.editparts.AbstractGraphicalEditPart#createFigure()
- */
- protected IFigure createFigure() {
-
- AbstractStructuredDataModel model = (AbstractStructuredDataModel) getModel();
-
- outerPane = new ContainerBoxFigure();
- outerPane.setMinimumSize(new Dimension(100, 100));
- outerPane.setBorder(new RoundedLineBorder(1, 5));
- outerPane.setForegroundColor(groupBorderColor);
- outerPane.setFill(true);
- outerPane.setBackgroundColor(ColorConstants.white);
- ContainerFigure titleFigure = new ContainerFigure(){
- @Override
- protected void fillShape(Graphics graphics) {
- graphics.pushState();
- graphics.setForegroundColor(graphics.getBackgroundColor());
- graphics.setBackgroundColor(ColorConstants.white);
- graphics.fillGradient(getBounds(), true);
- graphics.popState();
- }
- };
- // r.setCornerDimensions(new Dimension(4, 4));
- titleFigure.setOutline(false);
- titleFigure.setMinimumSize(new Dimension(0, 0));
-
- titleFigure.setFill(true);
-
- titleFigure.setBackgroundColor(groupHeaderColor);
- outerPane.add(titleFigure);
-
- label = new Label();
- label.setForegroundColor(ColorConstants.black);
- label.setBorder(new MarginBorder(2, 4, 2, 4));
- titleFigure.add(label); // Holder);
-
- RectangleFigure line = new RectangleFigure();
- line.setPreferredSize(20, 1);
- outerPane.add(line);
-
- int minHeight = 400;
- final int theMinHeight = minHeight;
- FillLayout outerLayout = new FillLayout() {
- protected Dimension calculatePreferredSize(IFigure parent,
- int width, int height) {
- Dimension d = super.calculatePreferredSize(parent, width,
- height);
- d.union(new Dimension(250, theMinHeight));
- return d;
- }
- };
-
- outerLayout.setHorizontal(false);
- // layout.setSpacing(5);
- outerPane.setLayoutManager(outerLayout);
-
- scrollpane = new ScrollPane();
- scrollpane.setForegroundColor(ColorConstants.black);
- scrollpane.setVerticalScrollBarVisibility(ScrollPane.AUTOMATIC);
- scrollpane.setHorizontalScrollBarVisibility(ScrollPane.AUTOMATIC);
- scrollpane.scrollHorizontalTo(scrollpane.getBounds().width / 2);
- scrollpane.scrollVerticalTo(scrollpane.getBounds().height / 2);
- outerPane.add(scrollpane);
-
- ContainerFigure pane = new ContainerFigure();
- pane.setBorder(new MarginBorder(5, 8, 5, 8));
- ContainerLayout layout = new ContainerLayout();
- layout.setHorizontal(false);
- layout.setSpacing(0);
- AbstractStructuredDataModel currentModel = (AbstractStructuredDataModel) this
- .getModel();
- if (!currentModel.isLeft()) {
- layout.setAlign(PositionConstants.RIGHT);
- }
- pane.setLayoutManager(layout);
- // pane.setBackgroundColor(ColorConstants.black);
- // pane.setFill(true);
-
- Viewport viewport = new Viewport();
- viewport.setContentsTracksHeight(true);
- ViewportLayout viewportLayout = new ViewportLayout() {
- protected Dimension calculatePreferredSize(IFigure parent,
- int width, int height) {
- Dimension d = super.calculatePreferredSize(parent, width,
- height);
- d.height = Math.min(d.height, theMinHeight - 25);
- return d;
- }
- };
-
- viewport.setLayoutManager(viewportLayout);
-
- scrollpane.setViewport(viewport);
- scrollpane.setContents(pane);
- if (model instanceof StructuredDataModel) {
- label.setText(((StructuredDataModel) model).getLabelName());
- }
- return outerPane;
- }
-
- /*
- * (non-Javadoc)
- *
- * @see org.eclipse.gef.editparts.AbstractEditPart#createEditPolicies()
- */
- protected void createEditPolicies() {
- this.installEditPolicy(EditPolicy.CONTAINER_ROLE,
- new ContainerEditPolicy() {
-
- @Override
- protected Command getCreateCommand(CreateRequest arg0) {
- return null;
- }
-
- });
-
- this.installEditPolicy(EditPolicy.GRAPHICAL_NODE_ROLE,
- new CustomGraphicalNodeEditPolicy());
-
- }
-
- /*
- * (non-Javadoc)
- *
- * @see
- * org.eclipse.gef.editparts.AbstractGraphicalEditPart#getModelSourceConnections
- * ()
- */
- @Override
- protected List getModelSourceConnections() {
- return ((IConnectableModel) getModel()).getModelSourceConnections();
- }
-
- /*
- * (non-Javadoc)
- *
- * @see
- * org.eclipse.gef.editparts.AbstractGraphicalEditPart#getModelTargetConnections
- * ()
- */
- @Override
- protected List getModelTargetConnections() {
- return ((IConnectableModel) getModel()).getModelTargetConnections();
- }
-
- /*
- * (non-Javadoc)
- *
- * @see org.eclipse.gef.editparts.AbstractEditPart#getModelChildren()
- */
- protected List getModelChildren() {
- return ((AbstractStructuredDataModel) getModel()).getChildren();
- }
-
- /*
- * (non-Javadoc)
- *
- * @see org.eclipse.gef.editparts.AbstractEditPart#refreshVisuals()
- */
- protected void refreshVisuals() {
- Rectangle constraint = null;
- AbstractStructuredDataModel model = (AbstractStructuredDataModel) getModel();
-
- if (model instanceof StructuredDataModel) {
- constraint = ((StructuredDataModel) model).getConstraint();
- }
- if (constraint == null)
- constraint = new Rectangle(0, 0, -1, -1);
- ((GraphicalEditPart) getParent()).setLayoutConstraint(this,
- getFigure(), constraint);
-
- super.refreshVisuals();
- }
-
- public ConnectionAnchor getSourceConnectionAnchor(ConnectionEditPart arg0) {
- return new ContainerRightEdgeAnchor(label);
- }
-
- public ConnectionAnchor getSourceConnectionAnchor(Request arg0) {
- return new RightSourceAnchor(label);
- }
-
- public ConnectionAnchor getTargetConnectionAnchor(ConnectionEditPart arg0) {
- return new ContainerLeftEdgeAnchor(label);
- }
-
- public ConnectionAnchor getTargetConnectionAnchor(Request arg0) {
- return new LeftSourceAnchor(label);
- }
-
- public IFigure getAnchroFigure() {
- return label;
- }
-}
\ No newline at end of file
Deleted:
branches/jbosstools-3.0.0.Beta1/smooks/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/ui/gef/figures/ConnectionPointFiguresLocationCaculator.java
===================================================================
---
branches/jbosstools-3.0.0.Beta1/smooks/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/ui/gef/figures/ConnectionPointFiguresLocationCaculator.java 2008-10-20
23:12:16 UTC (rev 11023)
+++
branches/jbosstools-3.0.0.Beta1/smooks/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/ui/gef/figures/ConnectionPointFiguresLocationCaculator.java 2008-10-21
03:41:10 UTC (rev 11024)
@@ -1,19 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2008 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:
- * Red Hat, Inc. - initial API and implementation
- ******************************************************************************/
-package org.jboss.tools.smooks.ui.gef.figures;
-
-/**
- * @author Dart Peng
- * @Date Jul 30, 2008
- */
-public class ConnectionPointFiguresLocationCaculator {
- int itemY = 0;
-}
Deleted:
branches/jbosstools-3.0.0.Beta1/smooks/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/ui/gef/figures/ContainerBoxFigure.java
===================================================================
---
branches/jbosstools-3.0.0.Beta1/smooks/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/ui/gef/figures/ContainerBoxFigure.java 2008-10-20
23:12:16 UTC (rev 11023)
+++
branches/jbosstools-3.0.0.Beta1/smooks/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/ui/gef/figures/ContainerBoxFigure.java 2008-10-21
03:41:10 UTC (rev 11024)
@@ -1,20 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2007 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:
- * Red Hat, Inc. - initial API and implementation
- ******************************************************************************/
-package org.jboss.tools.smooks.ui.gef.figures;
-
-/**
- * @author Dart Peng
- *
- */
-public class ContainerBoxFigure extends ContainerFigure implements
- ITreeContainer {
-
-}
Deleted:
branches/jbosstools-3.0.0.Beta1/smooks/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/ui/gef/figures/ContainerFigure.java
===================================================================
---
branches/jbosstools-3.0.0.Beta1/smooks/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/ui/gef/figures/ContainerFigure.java 2008-10-20
23:12:16 UTC (rev 11023)
+++
branches/jbosstools-3.0.0.Beta1/smooks/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/ui/gef/figures/ContainerFigure.java 2008-10-21
03:41:10 UTC (rev 11024)
@@ -1,52 +0,0 @@
-package org.jboss.tools.smooks.ui.gef.figures;
-
-import org.eclipse.draw2d.Graphics;
-import org.eclipse.draw2d.RectangleFigure;
-import org.jboss.tools.smooks.ui.gef.util.figures.ContainerLayout;
-
-
-public class ContainerFigure extends RectangleFigure implements IExpandable {
-
- protected boolean isOutlined = false;
-
- protected boolean isExpanded = true;
-
- public ContainerFigure() {
- setLayoutManager(new ContainerLayout());
- setFill(false);
- }
-
- public void doLayout() {
- layout();
- setValid(true);
- }
-
- public ContainerLayout getContainerLayout() {
- return (ContainerLayout) getLayoutManager();
- }
-
- public void setOutlined(boolean isOutlined) {
- this.isOutlined = isOutlined;
- }
-
- protected void outlineShape(Graphics graphics) {
- if (isOutlined) {
- super.outlineShape(graphics);
- }
- }
-
-
-
- /* (non-Javadoc)
- * @see org.eclipse.draw2d.RectangleFigure#fillShape(org.eclipse.draw2d.Graphics)
- */
-
- public boolean isExpanded() {
- return isExpanded;
- }
-
- public void setExpanded(boolean isExpanded) {
- this.isExpanded = isExpanded;
- }
-
-}
\ No newline at end of file
Deleted:
branches/jbosstools-3.0.0.Beta1/smooks/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/ui/gef/figures/ContainerLeftEdgeAnchor.java
===================================================================
---
branches/jbosstools-3.0.0.Beta1/smooks/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/ui/gef/figures/ContainerLeftEdgeAnchor.java 2008-10-20
23:12:16 UTC (rev 11023)
+++
branches/jbosstools-3.0.0.Beta1/smooks/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/ui/gef/figures/ContainerLeftEdgeAnchor.java 2008-10-21
03:41:10 UTC (rev 11024)
@@ -1,62 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2007 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:
- * Red Hat, Inc. - initial API and implementation
- ******************************************************************************/
-package org.jboss.tools.smooks.ui.gef.figures;
-
-import org.eclipse.draw2d.ChopboxAnchor;
-import org.eclipse.draw2d.IFigure;
-import org.eclipse.draw2d.geometry.Point;
-
-/**
- * @author Dart Peng
- *
- */
-public class ContainerLeftEdgeAnchor extends ChopboxAnchor {
-
- public ContainerLeftEdgeAnchor(IFigure owner) {
- super(owner);
- }
-
- /*
- * (non-Javadoc)
- *
- * @see
- * org.eclipse.draw2d.ChopboxAnchor#getLocation(org.eclipse.draw2d.geometry
- * .Point)
- */
- @Override
- public Point getLocation(Point reference) {
- Point p;
- IFigure figure = getOwner();
- IFigure parent = findTheTreeContainerFigure(figure);
- // caculate the right edge of parent figure
- if (parent == null)
- return getOwner().getBounds().getLeft();
- p = getOwner().getBounds().getCenter();
- getOwner().translateToAbsolute(p);
- p = getOwner().getBounds().getLeft();
- getOwner().translateToAbsolute(p);
- return new Point(parent.getBounds().x , p.y);
- }
-
- protected IFigure findTheTreeContainerFigure(IFigure figure) {
- if (figure == null)
- return null;
- IFigure parent = figure.getParent();
- if (parent == null)
- return null;
- if (parent instanceof ITreeContainer) {
- return parent;
- } else {
- return findTheTreeContainerFigure(parent);
- }
- }
-
-}
Deleted:
branches/jbosstools-3.0.0.Beta1/smooks/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/ui/gef/figures/ContainerRightEdgeAnchor.java
===================================================================
---
branches/jbosstools-3.0.0.Beta1/smooks/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/ui/gef/figures/ContainerRightEdgeAnchor.java 2008-10-20
23:12:16 UTC (rev 11023)
+++
branches/jbosstools-3.0.0.Beta1/smooks/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/ui/gef/figures/ContainerRightEdgeAnchor.java 2008-10-21
03:41:10 UTC (rev 11024)
@@ -1,62 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2007 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:
- * Red Hat, Inc. - initial API and implementation
- ******************************************************************************/
-package org.jboss.tools.smooks.ui.gef.figures;
-
-import org.eclipse.draw2d.ChopboxAnchor;
-import org.eclipse.draw2d.IFigure;
-import org.eclipse.draw2d.geometry.Point;
-
-/**
- * @author Dart Peng
- *
- */
-public class ContainerRightEdgeAnchor extends ChopboxAnchor {
-
- public ContainerRightEdgeAnchor(IFigure owner) {
- super(owner);
- }
-
- /*
- * (non-Javadoc)
- *
- * @see
- * org.eclipse.draw2d.ChopboxAnchor#getLocation(org.eclipse.draw2d.geometry
- * .Point)
- */
- @Override
- public Point getLocation(Point reference) {
- Point p;
- IFigure figure = getOwner();
- IFigure parent = findTheTreeContainerFigure(figure);
- // caculate the right edge of parent figure
- if (parent == null)
- return getOwner().getBounds().getRight();
- p = getOwner().getBounds().getCenter();
- getOwner().translateToAbsolute(p);
- p = getOwner().getBounds().getRight();
- getOwner().translateToAbsolute(p);
- return new Point(parent.getBounds().x + parent.getBounds().width, p.y);
- }
-
- protected IFigure findTheTreeContainerFigure(IFigure figure) {
- if (figure == null)
- return null;
- IFigure parent = figure.getParent();
- if (parent == null)
- return null;
- if (parent instanceof ITreeContainer) {
- return parent;
- } else {
- return findTheTreeContainerFigure(parent);
- }
- }
-
-}
Deleted:
branches/jbosstools-3.0.0.Beta1/smooks/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/ui/gef/figures/ExpandableGraphNodeContentFigure.java
===================================================================
---
branches/jbosstools-3.0.0.Beta1/smooks/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/ui/gef/figures/ExpandableGraphNodeContentFigure.java 2008-10-20
23:12:16 UTC (rev 11023)
+++
branches/jbosstools-3.0.0.Beta1/smooks/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/ui/gef/figures/ExpandableGraphNodeContentFigure.java 2008-10-21
03:41:10 UTC (rev 11024)
@@ -1,73 +0,0 @@
-package org.jboss.tools.smooks.ui.gef.figures;
-
-import org.eclipse.draw2d.IFigure;
-import org.eclipse.draw2d.MarginBorder;
-import org.eclipse.draw2d.RectangleFigure;
-import org.eclipse.draw2d.geometry.Dimension;
-import org.jboss.tools.smooks.ui.gef.util.figures.Interactor;
-
-
-//--------------------------------------------
-//| ExpandableGraphNodeContentFigure |
-//| |
-//| ---------------------------------- |
-//| | verticalGroup | |
-//| | | |
-//| | ----------------------------- | |
-//| | | horizontalGroup | | |
-//| | | | | |
-//| | | --------------------- | | |
-//| | | | outlinedArea | | | |
-//| | | | ----------------- | | | |
-//| | | | |[+]iconArea | | | | |
-//| | | | ----------------- | | | |
-//| | | | ----------------- | | | |
-//| | | | | innerContent | | | | |
-//| | | | ----------------- | | | |
-//| | | --------------------- | | |
-//| | ----------------------------- | |
-//| | | |
-//| ---------------------------------- |
-//--------------------------------------------
-
-public class ExpandableGraphNodeContentFigure extends GraphNodeContentFigure {
-
- protected IFigure interactor;
-
- public ExpandableGraphNodeContentFigure() {
- super();
- }
-
- public Interactor getInteractor() {
- return (Interactor)interactor;
- }
-
- protected void createFigure() {
- createVerticalGroup(this);
- createOutlinedArea(verticalGroup);
-// createInteractor(iconArea);
- innerContentArea.setBorder(new MarginBorder(0, 10, 0, 0));
- }
-
- protected void createInteractor(IFigure parent) {
-// interactor = new Interactor();
-// interactor.setBorder(new MarginBorder(0, 0, 0, 5));
-// interactor.setForegroundColor(ColorConstants.black);
-// interactor.setBackgroundColor(ColorConstants.white);
-// parent.add(interactor);
- }
-
- protected void createPreceedingSpace(IFigure parent) {
- RectangleFigure space = new RectangleFigure();
- space.setVisible(false);
- space.setPreferredSize(new Dimension(10, 10));
- parent.add(space);
- }
-
- /**
- */
- public void setInteractor(IFigure interactor) {
- this.interactor = interactor;
- iconArea.add(interactor);
- }
-}
\ No newline at end of file
Deleted:
branches/jbosstools-3.0.0.Beta1/smooks/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/ui/gef/figures/GraphNodeContentFigure.java
===================================================================
---
branches/jbosstools-3.0.0.Beta1/smooks/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/ui/gef/figures/GraphNodeContentFigure.java 2008-10-20
23:12:16 UTC (rev 11023)
+++
branches/jbosstools-3.0.0.Beta1/smooks/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/ui/gef/figures/GraphNodeContentFigure.java 2008-10-21
03:41:10 UTC (rev 11024)
@@ -1,79 +0,0 @@
-package org.jboss.tools.smooks.ui.gef.figures;
-
-import org.eclipse.draw2d.IFigure;
-import org.jboss.tools.smooks.ui.gef.util.figures.IConnectedFigure;
-
-
-//------------------------------
-//| GraphNodeContentFigure |
-//| |
-//| ------------------------- |
-//| | vertical group | |
-//| | --------------------- | |
-//| | | outlined area | | |
-//| | | ----------------- | | |
-//| | | | icon area | | | |
-//| | | ----------------- | | |
-//| | | ----------------- | | |
-//| | | | inner content | | | |
-//| | | ----------------- | | |
-//| | --------------------- | |
-//| ------------------------- |
-//------------------------------
-
-public class GraphNodeContentFigure extends ContainerFigure implements IConnectedFigure
{
-
- protected ContainerFigure verticalGroup;
- protected ContainerFigure outlinedArea;
- protected ContainerFigure iconArea;
- protected ContainerFigure innerContentArea;
-
- public GraphNodeContentFigure() {
- createFigure();
- }
-
- public IFigure getConnectionFigure() {
- return outlinedArea;
- }
-
- public ContainerFigure getIconArea() {
- return iconArea;
- }
-
- public ContainerFigure getOutlinedArea() {
- return outlinedArea;
- }
-
- public ContainerFigure getInnerContentArea() {
- return innerContentArea;
- }
-
- protected void createFigure() {
- createVerticalGroup(this);
- createOutlinedArea(verticalGroup);
- }
-
- protected void createVerticalGroup(IFigure parent) {
- verticalGroup = new ContainerFigure();
- verticalGroup.getContainerLayout().setHorizontal(false);
- parent.add(verticalGroup);
- }
-
- protected void createOutlinedArea(IFigure parent) {
- outlinedArea = new ContainerFigure();
- outlinedArea.getContainerLayout().setHorizontal(false);
-// outlinedArea.setBackgroundColor(ColorConstants.red);
-// outlinedArea.setFill(true);
- parent.add(outlinedArea);
-
- iconArea = new IconAreaFigure();
- iconArea.getContainerLayout().setHorizontal(true);
- outlinedArea.add(iconArea);
-
- innerContentArea = new ContainerFigure();
- innerContentArea.getContainerLayout().setHorizontal(false);
-// innerContentArea.setBackgroundColor(ColorConstants.red);
-// innerContentArea.setFill(true);
- outlinedArea.add(innerContentArea);
- }
-}
\ No newline at end of file
Deleted:
branches/jbosstools-3.0.0.Beta1/smooks/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/ui/gef/figures/GroupFigure.java
===================================================================
---
branches/jbosstools-3.0.0.Beta1/smooks/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/ui/gef/figures/GroupFigure.java 2008-10-20
23:12:16 UTC (rev 11023)
+++
branches/jbosstools-3.0.0.Beta1/smooks/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/ui/gef/figures/GroupFigure.java 2008-10-21
03:41:10 UTC (rev 11024)
@@ -1,153 +0,0 @@
-package org.jboss.tools.smooks.ui.gef.figures;
-
-import org.eclipse.draw2d.ColorConstants;
-import org.eclipse.draw2d.IFigure;
-import org.eclipse.draw2d.Label;
-import org.eclipse.draw2d.MarginBorder;
-import org.eclipse.draw2d.PositionConstants;
-import org.eclipse.draw2d.RectangleFigure;
-import org.eclipse.draw2d.ScrollPane;
-import org.eclipse.draw2d.Viewport;
-import org.eclipse.draw2d.ViewportLayout;
-import org.eclipse.draw2d.geometry.Dimension;
-import org.eclipse.swt.SWT;
-import org.jboss.tools.smooks.ui.gef.util.GraphicsConstants;
-import org.jboss.tools.smooks.ui.gef.util.figures.ContainerLayout;
-import org.jboss.tools.smooks.ui.gef.util.figures.FillLayout;
-
-
-//----------------------------------
-//| GroupFigure Head Area |
-//| |
-//| ----------------------------- |
-//| | | |
-//| | GroupFigure Client Area | |
-//| | | |
-//| | | |
-//| | | |
-//| | | |
-//| | | |
-//| | | |
-//| ----------------------------- |
-//----------------------------------
-public class GroupFigure extends RectangleFigure implements GraphicsConstants {
-
- private static final int DEFAULT_MIN_HEIGHT = 250;
-
- protected ScrollPane scrollpane;
- /**
- * Text Name
- */
- protected Label label;
- protected ContainerFigure outerPane;
-
- public GroupFigure() {
-
- FillLayout outerLayout = new FillLayout() {
- protected Dimension calculatePreferredSize(IFigure parent,
- int width, int height) {
- Dimension d = super.calculatePreferredSize(parent, width,
- height);
- d.union(new Dimension(100, DEFAULT_MIN_HEIGHT));
- return d;
- }
- };
- setLayoutManager(outerLayout);
- setFill(false);
- createFigure();
- }
-
- public void doLayout() {
- layout();
- setValid(true);
- }
-
- public FillLayout getFillLayout() {
- return (FillLayout)getLayoutManager();
- }
-
- protected void createFigure() {
- outerPane = new ContainerFigure();
- outerPane.setBorder(new RoundedLineBorder(1, 6));
- outerPane.setForegroundColor(groupBorderColor);
-
- ContainerFigure r = new ContainerFigure();
- //r.setCornerDimensions(new Dimension(4, 4));
- r.setOutline(false);
- r.setMinimumSize(new Dimension(0, 0));
-
- r.setFill(true);
-
- r.setBackgroundColor(groupHeaderColor);
- outerPane.add(r);
-
- //ContainerFigure labelHolder = new ContainerFigure();
- //labelHolder.add(label);
- label = new Label();
- label.setForegroundColor(ColorConstants.black);
- label.setBorder(new MarginBorder(2, 4, 2, 4));
- r.add(label); //Holder);
-// label.setTextAlignment(PositionConstants.RIGHT);
- RectangleFigure line = new RectangleFigure();
- line.setPreferredSize(20, 1);
- outerPane.add(line);
-
- int minHeight = 250;
- final int theMinHeight = minHeight;
- FillLayout outerLayout = new FillLayout() {
- protected Dimension calculatePreferredSize(IFigure parent,
- int width, int height) {
- Dimension d = super.calculatePreferredSize(parent, width,
- height);
- d.union(new Dimension(100, theMinHeight));
- return d;
- }
- };
-
- outerLayout.setHorizontal(false);
-// outerLayout.setSpacing(10);
- outerPane.setLayoutManager(outerLayout);
-
- scrollpane = new ScrollPane();
- scrollpane.setForegroundColor(ColorConstants.black);
- scrollpane.setVerticalScrollBarVisibility(ScrollPane.AUTOMATIC);
//ScrollPane.ALWAYS);
- outerPane.add(scrollpane);
-
- ContainerFigure pane = new ContainerFigure();
- pane.setBorder(new MarginBorder(5, 8, 5, 8));
- ContainerLayout layout = new ContainerLayout();
- layout.setHorizontal(false);
- layout.setSpacing(0);
- pane.setLayoutManager(layout);
-
- Viewport viewport = new Viewport();
- viewport.setContentsTracksHeight(true);
- ViewportLayout viewportLayout = new ViewportLayout() {
- protected Dimension calculatePreferredSize(IFigure parent,
- int width, int height) {
- Dimension d = super.calculatePreferredSize(parent, width,
- height);
- d.height = Math.min(d.height, theMinHeight - 25); //
getViewer().getControl().getBounds().height);
- return d;
- }
- };
-
- viewport.setLayoutManager(viewportLayout);
-
- scrollpane.setViewport(viewport);
- scrollpane.setContents(pane);
-
- this.add(outerPane);
- }
-
- public void setTextName(String name) {
- label.setText(name);
- }
-
- /**
- * @return
- */
- public String getTextName() {
- return label == null ? null : label.getText();
- }
-}
\ No newline at end of file
Deleted:
branches/jbosstools-3.0.0.Beta1/smooks/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/ui/gef/figures/IExpandable.java
===================================================================
---
branches/jbosstools-3.0.0.Beta1/smooks/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/ui/gef/figures/IExpandable.java 2008-10-20
23:12:16 UTC (rev 11023)
+++
branches/jbosstools-3.0.0.Beta1/smooks/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/ui/gef/figures/IExpandable.java 2008-10-21
03:41:10 UTC (rev 11024)
@@ -1,9 +0,0 @@
-package org.jboss.tools.smooks.ui.gef.figures;
-
-import org.eclipse.draw2d.IFigure;
-
-public interface IExpandable extends IFigure {
- boolean isExpanded();
-
- void setExpanded(boolean isExpanded);
-}
Deleted:
branches/jbosstools-3.0.0.Beta1/smooks/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/ui/gef/figures/ITreeContainer.java
===================================================================
---
branches/jbosstools-3.0.0.Beta1/smooks/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/ui/gef/figures/ITreeContainer.java 2008-10-20
23:12:16 UTC (rev 11023)
+++
branches/jbosstools-3.0.0.Beta1/smooks/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/ui/gef/figures/ITreeContainer.java 2008-10-21
03:41:10 UTC (rev 11024)
@@ -1,19 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2007 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:
- * Red Hat, Inc. - initial API and implementation
- ******************************************************************************/
-package org.jboss.tools.smooks.ui.gef.figures;
-
-/**
- * @author Dart Peng
- *
- */
-public interface ITreeContainer {
-
-}
Deleted:
branches/jbosstools-3.0.0.Beta1/smooks/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/ui/gef/figures/IconAreaFigure.java
===================================================================
---
branches/jbosstools-3.0.0.Beta1/smooks/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/ui/gef/figures/IconAreaFigure.java 2008-10-20
23:12:16 UTC (rev 11023)
+++
branches/jbosstools-3.0.0.Beta1/smooks/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/ui/gef/figures/IconAreaFigure.java 2008-10-21
03:41:10 UTC (rev 11024)
@@ -1,25 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2007 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:
- * Red Hat, Inc. - initial API and implementation
- ******************************************************************************/
-package org.jboss.tools.smooks.ui.gef.figures;
-
-
-/**
- * @author Dart Peng
- *
- */
-public class IconAreaFigure extends ContainerFigure {
-
- public IconAreaFigure() {
- setLayoutManager(new RightAlignContainerLayout());
- setFill(false);
- }
-
-}
Deleted:
branches/jbosstools-3.0.0.Beta1/smooks/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/ui/gef/figures/LabelAreaFigure.java
===================================================================
---
branches/jbosstools-3.0.0.Beta1/smooks/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/ui/gef/figures/LabelAreaFigure.java 2008-10-20
23:12:16 UTC (rev 11023)
+++
branches/jbosstools-3.0.0.Beta1/smooks/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/ui/gef/figures/LabelAreaFigure.java 2008-10-21
03:41:10 UTC (rev 11024)
@@ -1,20 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2007 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:
- * Red Hat, Inc. - initial API and implementation
- ******************************************************************************/
-package org.jboss.tools.smooks.ui.gef.figures;
-
-/**
- * @author Dart Peng
- *
- * @CreateTime Jul 21, 2008
- */
-public class LabelAreaFigure extends ContainerFigure {
-
-}
Deleted:
branches/jbosstools-3.0.0.Beta1/smooks/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/ui/gef/figures/RightAlignContainerLayout.java
===================================================================
---
branches/jbosstools-3.0.0.Beta1/smooks/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/ui/gef/figures/RightAlignContainerLayout.java 2008-10-20
23:12:16 UTC (rev 11023)
+++
branches/jbosstools-3.0.0.Beta1/smooks/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/ui/gef/figures/RightAlignContainerLayout.java 2008-10-21
03:41:10 UTC (rev 11024)
@@ -1,34 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2007 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:
- * Red Hat, Inc. - initial API and implementation
- ******************************************************************************/
-package org.jboss.tools.smooks.ui.gef.figures;
-
-import org.eclipse.draw2d.IFigure;
-import org.eclipse.draw2d.PositionConstants;
-import org.jboss.tools.smooks.ui.gef.util.figures.ContainerLayout;
-
-/**
- * @author Dart Peng
- *
- */
-public class RightAlignContainerLayout extends ContainerLayout {
-
- public RightAlignContainerLayout() {
- super();
- this.setAlign(PositionConstants.RIGHT);
- this.setHorizontal(false);
- }
-
- @Override
- public void layout(IFigure parent) {
- super.layout(parent);
- }
-
-}
Deleted:
branches/jbosstools-3.0.0.Beta1/smooks/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/ui/gef/figures/RoundedLineBorder.java
===================================================================
---
branches/jbosstools-3.0.0.Beta1/smooks/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/ui/gef/figures/RoundedLineBorder.java 2008-10-20
23:12:16 UTC (rev 11023)
+++
branches/jbosstools-3.0.0.Beta1/smooks/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/ui/gef/figures/RoundedLineBorder.java 2008-10-21
03:41:10 UTC (rev 11024)
@@ -1,51 +0,0 @@
-package org.jboss.tools.smooks.ui.gef.figures;
-
-import org.eclipse.draw2d.Graphics;
-import org.eclipse.draw2d.IFigure;
-import org.eclipse.draw2d.LineBorder;
-import org.eclipse.draw2d.geometry.Insets;
-import org.eclipse.swt.graphics.Color;
-
-public class RoundedLineBorder extends LineBorder {
- protected int arcLength;
-
- protected int lineStyle = Graphics.LINE_SOLID;
-
- public RoundedLineBorder(Color c, int width, int arcLength) {
- super(c, width);
- this.arcLength = arcLength;
- }
-
- public RoundedLineBorder(int width, int arcLength) {
- super(width);
- this.arcLength = arcLength;
- }
-
- public RoundedLineBorder(Color c, int width, int arcLength, int lineStyle) {
- super(c, width);
- this.arcLength = arcLength;
- this.lineStyle = lineStyle;
- }
-
- public RoundedLineBorder(int width, int arcLength, int lineStyle) {
- super(width);
- this.arcLength = arcLength;
- this.lineStyle = lineStyle;
- }
-
- public void paint(IFigure figure, Graphics graphics, Insets insets) {
- tempRect.setBounds(getPaintRectangle(figure, insets));
- int width = getWidth();
- Color color = getColor();
- if (width % 2 == 1) {
- tempRect.width--;
- tempRect.height--;
- }
- tempRect.shrink(width / 2, width / 2);
- graphics.setLineWidth(width);
- graphics.setLineStyle(lineStyle);
- if (color != null)
- graphics.setForegroundColor(color);
- graphics.drawRoundRectangle(tempRect, arcLength, arcLength);
- }
-}
Deleted:
branches/jbosstools-3.0.0.Beta1/smooks/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/ui/gef/figures/SourceConnectionDecoration.java
===================================================================
---
branches/jbosstools-3.0.0.Beta1/smooks/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/ui/gef/figures/SourceConnectionDecoration.java 2008-10-20
23:12:16 UTC (rev 11023)
+++
branches/jbosstools-3.0.0.Beta1/smooks/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/ui/gef/figures/SourceConnectionDecoration.java 2008-10-21
03:41:10 UTC (rev 11024)
@@ -1,21 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2007 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:
- * Red Hat, Inc. - initial API and implementation
- ******************************************************************************/
-package org.jboss.tools.smooks.ui.gef.figures;
-
-import org.eclipse.draw2d.Figure;
-
-/**
- * @author Dart Peng
- *
- */
-public class SourceConnectionDecoration extends Figure {
-
-}
Deleted:
branches/jbosstools-3.0.0.Beta1/smooks/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/ui/gef/figures/SpacingFigure.java
===================================================================
---
branches/jbosstools-3.0.0.Beta1/smooks/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/ui/gef/figures/SpacingFigure.java 2008-10-20
23:12:16 UTC (rev 11023)
+++
branches/jbosstools-3.0.0.Beta1/smooks/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/ui/gef/figures/SpacingFigure.java 2008-10-21
03:41:10 UTC (rev 11024)
@@ -1,11 +0,0 @@
-package org.jboss.tools.smooks.ui.gef.figures;
-
-import org.eclipse.draw2d.RectangleFigure;
-import org.eclipse.draw2d.geometry.Dimension;
-
-public class SpacingFigure extends RectangleFigure {
- public SpacingFigure() {
- setFill(false);
- setPreferredSize(new Dimension(0, 0));
- }
-}
Deleted:
branches/jbosstools-3.0.0.Beta1/smooks/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/ui/gef/figures/TreeNodeContentFigure.java
===================================================================
---
branches/jbosstools-3.0.0.Beta1/smooks/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/ui/gef/figures/TreeNodeContentFigure.java 2008-10-20
23:12:16 UTC (rev 11023)
+++
branches/jbosstools-3.0.0.Beta1/smooks/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/ui/gef/figures/TreeNodeContentFigure.java 2008-10-21
03:41:10 UTC (rev 11024)
@@ -1,77 +0,0 @@
-package org.jboss.tools.smooks.ui.gef.figures;
-
-import org.eclipse.draw2d.ColorConstants;
-import org.eclipse.draw2d.Graphics;
-import org.eclipse.draw2d.IFigure;
-import org.eclipse.draw2d.MarginBorder;
-import org.jboss.tools.smooks.ui.gef.util.GraphicsConstants;
-
-/**
- *
- * @author Dart Peng
- *
- * @CreateTime Jul 21, 2008
- */
-public class TreeNodeContentFigure extends ExpandableGraphNodeContentFigure
- implements ISelectableFigure {
-
- private boolean selected = false;
-
- /**
- * @return the selected
- */
- public boolean getSelected() {
- return selected;
- }
-
- /**
- * @param selected
- * the selected to set
- */
- public void setSelected(boolean selected) {
- this.selected = selected;
- this.repaint();
- }
-
- /**
- * @return the focus
- */
- public boolean getFocus() {
- return focus;
- }
-
- /**
- * @param focus
- * the focus to set
- */
- public void setFocus(boolean focus) {
- this.focus = focus;
- }
-
- private boolean focus = false;
-
- public IFigure getConnectionFigure() {
- return outlinedArea;
- }
-
- protected void createOutlinedArea(IFigure parent) {
- super.createOutlinedArea(parent);
- outlinedArea.setBorder(new MarginBorder(0, 2, 0, 2));
- }
-
- protected void fillShape(Graphics graphics) {
- super.fillShape(graphics);
- }
-
- public void paintFigure(Graphics graphics){
- super.paintFigure(graphics);
- ContainerFigure figure = this.getIconArea();
- if (this.selected) {
- figure.setFill(true);
- figure.setBackgroundColor(GraphicsConstants.groupHeaderColor);
- } else {
- figure.setFill(false);
- figure.setBackgroundColor(ColorConstants.white);
- }
- }
-}
Deleted:
branches/jbosstools-3.0.0.Beta1/smooks/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/ui/gef/model/DataObjectContainerModel.java
===================================================================
---
branches/jbosstools-3.0.0.Beta1/smooks/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/ui/gef/model/DataObjectContainerModel.java 2008-10-20
23:12:16 UTC (rev 11023)
+++
branches/jbosstools-3.0.0.Beta1/smooks/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/ui/gef/model/DataObjectContainerModel.java 2008-10-21
03:41:10 UTC (rev 11024)
@@ -1,41 +0,0 @@
-package org.jboss.tools.smooks.ui.gef.model;
-
-import org.eclipse.draw2d.geometry.Rectangle;
-
-/**
- * @deprecated
- *
- */
-public class DataObjectContainerModel extends AbstractStructuredDataModel {
-
- public static final int SOURCE_DATA_OBJECT_CONTAINER = 1;
- public static final int TARGET_DATA_OBJECT_CIBTAUBER = 2;
-
- private String name;
- private Rectangle constraint;
- private int category = -1;
-
- public int getCategory() {
- return category;
- }
-
- public void setCategory(int category) {
- this.category = category;
- }
-
- public Rectangle getConstraint() {
- return constraint;
- }
-
- public void setConstraint(Rectangle constraint) {
- this.constraint = constraint;
- }
-
- public String getName() {
- return name;
- }
-
- public void setName(String name) {
- this.name = name;
- }
-}
\ No newline at end of file
Deleted:
branches/jbosstools-3.0.0.Beta1/smooks/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/ui/gef/model/HiddenAreaModel.java
===================================================================
---
branches/jbosstools-3.0.0.Beta1/smooks/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/ui/gef/model/HiddenAreaModel.java 2008-10-20
23:12:16 UTC (rev 11023)
+++
branches/jbosstools-3.0.0.Beta1/smooks/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/ui/gef/model/HiddenAreaModel.java 2008-10-21
03:41:10 UTC (rev 11024)
@@ -1,27 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2007 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:
- * Red Hat, Inc. - initial API and implementation
- ******************************************************************************/
-package org.jboss.tools.smooks.ui.gef.model;
-
-import java.util.Collections;
-import java.util.List;
-
-/**
- * @author Dart Peng
- *
- */
-public class HiddenAreaModel extends AbstractStructuredDataModel {
-
- @Override
- public List getChildren() {
- return Collections.EMPTY_LIST;
- }
-
-}
Deleted:
branches/jbosstools-3.0.0.Beta1/smooks/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/ui/gef/policy/NodeSelectionHandlesEditPolicyImpl.java
===================================================================
---
branches/jbosstools-3.0.0.Beta1/smooks/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/ui/gef/policy/NodeSelectionHandlesEditPolicyImpl.java 2008-10-20
23:12:16 UTC (rev 11023)
+++
branches/jbosstools-3.0.0.Beta1/smooks/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/ui/gef/policy/NodeSelectionHandlesEditPolicyImpl.java 2008-10-21
03:41:10 UTC (rev 11024)
@@ -1,32 +0,0 @@
-package org.jboss.tools.smooks.ui.gef.policy;
-
-import java.util.ArrayList;
-import java.util.List;
-
-import org.eclipse.draw2d.IFigure;
-import org.eclipse.gef.EditPart;
-import org.eclipse.gef.GraphicalEditPart;
-import org.eclipse.gef.editpolicies.SelectionHandlesEditPolicy;
-import org.eclipse.gef.handles.MoveHandle;
-import org.eclipse.gef.handles.MoveHandleLocator;
-import org.jboss.tools.smooks.ui.gef.editparts.StructuredDataContentEditPart;
-
-public class NodeSelectionHandlesEditPolicyImpl extends SelectionHandlesEditPolicy {
-
- protected List createSelectionHandles() {
-
- List list = new ArrayList();
- EditPart editPart = getHost();
-
- if ( editPart instanceof GraphicalEditPart ) {
- GraphicalEditPart graphicalEditPart = (GraphicalEditPart)editPart;
- IFigure figure = (graphicalEditPart instanceof StructuredDataContentEditPart ) ?
- ((StructuredDataContentEditPart)graphicalEditPart).getSelectionFigure() :
graphicalEditPart.getFigure();
-
- MoveHandleLocator loc = new MoveHandleLocator(figure);
- MoveHandle moveHandle = new MoveHandle(graphicalEditPart, loc);
- list.add(moveHandle);
- }
- return list;
- }
-}
\ No newline at end of file
Modified:
branches/jbosstools-3.0.0.Beta1/smooks/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/ui/gef/policy/RootGraphicsXYLayoutEditPolicy.java
===================================================================
---
branches/jbosstools-3.0.0.Beta1/smooks/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/ui/gef/policy/RootGraphicsXYLayoutEditPolicy.java 2008-10-20
23:12:16 UTC (rev 11023)
+++
branches/jbosstools-3.0.0.Beta1/smooks/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/ui/gef/policy/RootGraphicsXYLayoutEditPolicy.java 2008-10-21
03:41:10 UTC (rev 11024)
@@ -1,6 +1,5 @@
package org.jboss.tools.smooks.ui.gef.policy;
-import org.eclipse.draw2d.geometry.Rectangle;
import org.eclipse.gef.EditPart;
import org.eclipse.gef.EditPolicy;
import org.eclipse.gef.GraphicalEditPart;
@@ -10,10 +9,8 @@
import org.eclipse.gef.editpolicies.XYLayoutEditPolicy;
import org.eclipse.gef.requests.ChangeBoundsRequest;
import org.eclipse.gef.requests.CreateRequest;
-import org.jboss.tools.smooks.ui.gef.commands.ChangeConstraintCommand;
import org.jboss.tools.smooks.ui.gef.commands.CommandMappingFactory;
import org.jboss.tools.smooks.ui.gef.commands.ICommandMappingFactory;
-import org.jboss.tools.smooks.ui.gef.model.IGraphicalModel;
@@ -55,15 +52,16 @@
@Override
protected Command createChangeConstraintCommand(EditPart child,
Object constraint) {
- Rectangle con = (Rectangle) constraint;
- Object model = child.getModel();
- ChangeConstraintCommand command = null;
- if (model instanceof IGraphicalModel) {
- command = new ChangeConstraintCommand();
- command.setConstraint(con);
- command.setGraphicalModel((IGraphicalModel) model);
- }
- return command;
+// Rectangle con = (Rectangle) constraint;
+// Object model = child.getModel();
+// ChangeConstraintCommand command = null;
+// if (model instanceof IGraphicalModel) {
+// command = new ChangeConstraintCommand();
+// command.setConstraint(con);
+// command.setGraphicalModel((IGraphicalModel) model);
+// }
+// return command;
+ return null;
}
@Override