Examples of DiagramResourceCache


Examples of org.eclipse.sapphire.ui.swt.gef.model.DiagramResourceCache

  private Listener connectionListener;
 
  public DiagramPagePresentation(final SapphirePart part, final DiagramConfigurationManager configManager, final Shell shell)
  {
    super(part, null, configManager, shell);
    this.resourceCache = new DiagramResourceCache();
    constructNodes();
  }
View Full Code Here

Examples of org.eclipse.sapphire.ui.swt.gef.model.DiagramResourceCache

  }
 
  @Override
  protected Color getBorderColor() {
    DiagramConnectionEditPart editPart = (DiagramConnectionEditPart)this.getOwner();
    DiagramResourceCache cache = editPart.getCastedModel().getDiagramModel().getResourceCache();
    return isPrimary() ? cache.getColor(FOREGROUND_COLOR_PRIMARY) : cache.getColor(FOREGROUND_COLOR_SECONDARY);
  }
View Full Code Here

Examples of org.eclipse.sapphire.ui.swt.gef.model.DiagramResourceCache

  }

  @Override
  protected Color getFillColor() {
    DiagramConnectionEditPart editPart = (DiagramConnectionEditPart)this.getOwner();
    DiagramResourceCache cache = editPart.getCastedModel().getDiagramModel().getResourceCache();
    return isPrimary() ? cache.getColor(BACKGROUND_COLOR_PRIMARY) : cache.getColor(BACKGROUND_COLOR_SECONDARY);
  }
View Full Code Here

Examples of org.eclipse.sapphire.ui.swt.gef.model.DiagramResourceCache

  }
 
  @Override
  protected Color getBorderColor() {
    DiagramConnectionEditPart editPart = (DiagramConnectionEditPart)this.getOwner();
    DiagramResourceCache cache = editPart.getCastedModel().getDiagramModel().getResourceCache();
    return isPrimary() ? cache.getColor(FOREGROUND_COLOR_PRIMARY) : cache.getColor(FOREGROUND_COLOR_SECONDARY);
  }
View Full Code Here

Examples of org.eclipse.sapphire.ui.swt.gef.model.DiagramResourceCache

  }

  @Override
  protected Color getFillColor() {
    DiagramConnectionEditPart editPart = (DiagramConnectionEditPart)this.getOwner();
    DiagramResourceCache cache = editPart.getCastedModel().getDiagramModel().getResourceCache();
    return isPrimary() ? cache.getColor(BACKGROUND_COLOR_PRIMARY) : cache.getColor(BACKGROUND_COLOR_SECONDARY);
  }
View Full Code Here

Examples of org.eclipse.sapphire.ui.swt.gef.model.DiagramResourceCache

    if (insertionLine == null) {
      insertionLine = new Polyline();
      insertionLine.setLineWidth(2);
      if (getHost() instanceof ShapeEditPart) {
        ShapeEditPart shapeEditPart = (ShapeEditPart)getHost();
        DiagramResourceCache resourceCache = shapeEditPart.getNodeEditPart().getCastedModel().getDiagramModel().getResourceCache();
        insertionLine.setForegroundColor(resourceCache.getOutlineColor());
      }
      insertionLine.addPoint(new Point(0, 0));
      insertionLine.addPoint(new Point(10, 10));
      addFeedback(insertionLine);
    }
View Full Code Here

Examples of org.eclipse.sapphire.ui.swt.gef.model.DiagramResourceCache

  {
    List<AbstractHandle> list = new ArrayList<AbstractHandle>();
    GraphicalEditPart owner = (GraphicalEditPart) getHost();
    ShapeEditPart shapeEditPart = (ShapeEditPart)owner;
    SelectionPresentation selectionPresentation = shapeEditPart.getShapePresentation().getSelectionPresentation();
    DiagramResourceCache resourceCache = shapeEditPart.getNodeEditPart().getCastedModel().getDiagramModel().getResourceCache();
    SapphireSurroundingHandle selectionHandle = new SapphireSurroundingHandle(owner, shapeEditPart.getConfigurationManager(),
        resourceCache, isDragAllowed());
    if (selectionPresentation != null)
    {
      selectionHandle.setLineOffset(selectionPresentation.getOffset().content());
View Full Code Here

Examples of org.eclipse.sapphire.ui.swt.gef.model.DiagramResourceCache

  {
    return getCastedModel().getPresentation();
  }
 
  public void updateStyle(PolylineConnection connection) {
    DiagramResourceCache resourceCache = getCastedModel().getDiagramModel().getResourceCache();
    DiagramConnectionPart connectionPart = getCastedModel().getModelPart();
    IDiagramConnectionDef def = connectionPart.getConnectionDef();
    connection.setLineStyle(resourceCache.getLinkStyle(def));
    connection.setLineWidth(def.getLineWidth().content());
    connection.setForegroundColor(resourceCache.getLineColor(connectionPart));
  }
View Full Code Here

Examples of org.eclipse.sapphire.ui.swt.gef.model.DiagramResourceCache

  @Override
  protected List<?> createSelectionHandles()
  {
    List<AbstractHandle> list = new ArrayList<AbstractHandle>();
    GraphicalEditPart owner = (GraphicalEditPart) getHost();
    DiagramResourceCache resourceCache = ((DiagramNodeEditPart)owner).getCastedModel().getDiagramModel().getResourceCache();
    SelectionPresentation selectionPresentation = ((DiagramNodeEditPart)owner).getCastedModel().getShapeModel().getShapePresentation().getSelectionPresentation();
    SapphireSurroundingHandle selectionHandle = new SapphireSurroundingHandle(owner, ((DiagramNodeEditPart)owner).getConfigurationManager(),
        resourceCache, isDragAllowed());
    if (selectionPresentation != null)
    {
View Full Code Here

Examples of org.eclipse.sapphire.ui.swt.gef.model.DiagramResourceCache

  public static Handle moveHandle(GraphicalEditPart owner, Cursor cursor) {
    MoveHandle moveHandle = new MoveHandle(owner);
    //moveHandle.setDragTracker(tracker);
    moveHandle.setCursor(cursor);

      DiagramResourceCache resourceCache = ((DiagramConnectionLabelEditPart)owner).getCastedModel().getDiagramModel().getResourceCache();
    moveHandle.setBorder(new LineBorder(resourceCache.getOutlineColor(), 1, Graphics.LINE_DASH));

    return moveHandle;
  }
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.