Package org.eclipse.gef.examples.logicdesigner.figures

Examples of org.eclipse.gef.examples.logicdesigner.figures.StickyNoteFigure


  installEditPolicy(EditPolicy.DIRECT_EDIT_ROLE, new LabelDirectEditPolicy());
  installEditPolicy(EditPolicy.COMPONENT_ROLE,new LogicLabelEditPolicy());
}

protected IFigure createFigure() {
  StickyNoteFigure label = new StickyNoteFigure();
  return label;
}
View Full Code Here


  }
}

protected void initCellEditor() {
  // update text
  StickyNoteFigure stickyNote = (StickyNoteFigure)getEditPart().getFigure();
  getCellEditor().setValue(stickyNote.getText());
  // update font
  ZoomManager zoomMgr = (ZoomManager)getEditPart().getViewer()
      .getProperty(ZoomManager.class.toString());
  if (zoomMgr != null) {
    // this will force the font to be set
    cachedZoom = -1.0;
    updateScaledFont(zoomMgr.getZoom());
    zoomMgr.addZoomListener(zoomListener);
  } else
    getCellEditor().getControl().setFont(stickyNote.getFont());

  // Hook the cell editor's copy/paste actions to the actionBars so that they can
  // be invoked via keyboard shortcuts.
  actionBars = PlatformUI.getWorkbench().getActiveWorkbenchWindow().getActivePage()
      .getActiveEditor().getEditorSite().getActionBars();
View Full Code Here

TOP

Related Classes of org.eclipse.gef.examples.logicdesigner.figures.StickyNoteFigure

Copyright © 2018 www.massapicom. 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.