Package org.dyno.visual.swing.plugin.spi

Examples of org.dyno.visual.swing.plugin.spi.IEditorAdapter


  }

  @Override
  public IStatus execute(IProgressMonitor monitor, IAdaptable info)
      throws ExecutionException {
    IEditorAdapter editorAdapter = (IEditorAdapter) adapter
        .getAdapter(IEditorAdapter.class);
    if (editorAdapter != null)
      editorAdapter.setWidgetValue(new_value);
    adapter.repaintDesigner();
    return Status.OK_STATUS;
  }
View Full Code Here


  }

  @Override
  public IStatus undo(IProgressMonitor monitor, IAdaptable info)
      throws ExecutionException {
    IEditorAdapter editorAdapter = (IEditorAdapter) adapter
        .getAdapter(IEditorAdapter.class);
    if (editorAdapter != null)
      editorAdapter.setWidgetValue(old_value);
    adapter.repaintDesigner();
    return Status.OK_STATUS;
  }
View Full Code Here

      return false;
  }

  private void startEditComponent(Component hovered, Point loc) {
    WidgetAdapter adapter = WidgetAdapter.getWidgetAdapter(hovered);
    IEditorAdapter editorAdapter = (IEditorAdapter) adapter.getAdapter(IEditorAdapter.class);
    IEditor iEditor = null;
    if (editorAdapter != null) {
      editorAdapter.setHotspot(loc);
      iEditor = editorAdapter.getEditorAt();
    }
    if (iEditor != null) {
      iEditor.setFont(adapter.getWidget().getFont());
      iEditor.setValue(editorAdapter.getWidgetValue());
      iEditor.addChangeListener(this);
      Rectangle bounds = editorAdapter.getEditorBounds();
      bounds = SwingUtilities.convertRectangle(hovered, bounds, designer);
      Component comp = iEditor.getComponent();
      Font f = adapter.getWidget().getFont();
      if (f != null) {
        comp.setFont(f);
View Full Code Here

TOP

Related Classes of org.dyno.visual.swing.plugin.spi.IEditorAdapter

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.