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

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


      JMenu jmenu = (JMenu) adaptable.getWidget();
      JPopupMenu popup = jmenu.getPopupMenu();
      CompositeAdapter adapter = (CompositeAdapter) WidgetAdapter.getWidgetAdapter(popup);
      if (adapter == null)
        adapter = (CompositeAdapter) ExtensionRegistry.createWidgetAdapter(popup);
      IPainter painter = (IPainter) adapter.getAdapter(IPainter.class);
      painter.paintHovered(clipg);
    } else {
      if (((JMenuDesignOperation)getOperation()).getDropStatus()== JMenuDesignOperation.DROPPING_FORBIDDEN) {
        JMenu jmenu = (JMenu) adaptable.getWidget();
        Graphics2D g2d = (Graphics2D) clipg;
        g2d.setStroke(STROKE);
View Full Code Here


    if (focused.isRoot())
      jpar = focused.getRootPane();
    Rectangle local = SwingUtilities.getLocalBounds(jpar);
    Rectangle pub = SwingUtilities.convertRectangle(jpar, local, designer);
    Graphics clipg = g.create(pub.x, pub.y, pub.width + 1, pub.height + 1);
    IPainter painter = (IPainter) focused.getAdapter(IPainter.class);
    painter.paintGrid(clipg);
    clipg.dispose();
  }
View Full Code Here

    if (selected.isRoot())
      jpar = selected.getRootPane();
    Rectangle local = SwingUtilities.getLocalBounds(jpar);
    Rectangle pub = SwingUtilities.convertRectangle(jpar, local, designer);
    Graphics clipg = g.create(pub.x, pub.y, pub.width + 1, pub.height + 1);
    IPainter painter = (IPainter) selected.getAdapter(IPainter.class);
    painter.paintAnchor(clipg);
    clipg.dispose();
  }
View Full Code Here

    if (hinted.isRoot())
      jpar = hinted.getRootPane();
    Rectangle local = SwingUtilities.getLocalBounds(jpar);
    Rectangle pub = SwingUtilities.convertRectangle(jpar, local, designer);
    Graphics clipg = g.create(pub.x, pub.y, pub.width + 1, pub.height + 1);
    IPainter painter = (IPainter) hinted.getAdapter(IPainter.class);
    painter.paintHint(clipg);
    clipg.dispose();
  }
View Full Code Here

  private void paintHoveredAdapter(Graphics g, CompositeAdapter hovered) {
    Component jpar = hovered.getWidget();
    if (hovered.isRoot())
      jpar = hovered.getRootPane();
    IPainter painter = (IPainter) hovered.getAdapter(IPainter.class);
    if (hovered.needGlobalGraphics()) {
      painter.paintHovered(g);
    } else {
      Rectangle local = SwingUtilities.getLocalBounds(jpar);
      Rectangle pub = SwingUtilities.convertRectangle(jpar, local, designer);
      Graphics clipg = g.create(pub.x, pub.y, pub.width + 1, pub.height + 1);
      painter.paintHovered(clipg);
      clipg.dispose();
    }
  }
View Full Code Here

      int h = comp.getHeight();
      Point hs = adapter.getHotspotPoint();
      int x = e.x - hs.x;
      int y = e.y - hs.y;
      Graphics clipg = g.create(x - 1, y - 1, w + 2, h + 2);
      IPainter painter = (IPainter) adapter.getAdapter(IPainter.class);
      painter.paintMascot(clipg);
      clipg.dispose();
    }
  }
View Full Code Here

TOP

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

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.