Package java.awt

Examples of java.awt.Component$AWTTreeLock


     * @param layer the layer to get the palette for
     * @param cl the listener to associate with the palette
     * @return the frame that the palette is in
     */
    public static JFrame getPaletteWindow(Layer layer, ComponentListener cl) {
        Component layerGUI = getLayerGUIComponent(layer);

        JPanel dismissBox = new JPanel();
        dismissBox.setLayout(new BoxLayout(dismissBox, BoxLayout.X_AXIS));
        dismissBox.setAlignmentX(Component.LEFT_ALIGNMENT);
        dismissBox.setAlignmentY(Component.BOTTOM_ALIGNMENT);
View Full Code Here


     * @param layer the layer to get the palette for
     * @return the Component that represents the GUI for the layer.
     */
    public static Component getLayerGUIComponent(Layer layer) {

        Component pal = layer.getGUI();
        if (pal == null) {
            pal = new JLabel("No Palette");
        }

        JPanel p = new JPanel();
View Full Code Here

    /**
     * ComponentListener method, new size is noted.
     */
    public void componentResized(ComponentEvent e) {
        Component source = (Component) e.getSource();
        setComponentSize(source.getSize());

        Iterator it = iterator();
        while (it.hasNext()) {
            ((ComponentListener) it.next()).componentResized(e);
        }
View Full Code Here

        }

        // We need to do this after componentHidden notifications,
        // otherwise the component never finds out it's been hidden,
        // it gets removed as a ComponentListener at cleanup.
        Component source = (Component) e.getSource();
        if (display == source) {
            cleanUp();
        }
    }
View Full Code Here

     * WE STRONGLY RECOMMEND THAT YOU DO NOT OVERRIDE THIS METHOD. This method
     * marks the layer buffer so that it will be refreshed. If you override this
     * method, and don't call super.repaint(), the layers will not be repainted.
     */
    public void repaint(long tm, int x, int y, int width, int height) {
        Component p = getParent();
        if (p instanceof MapBean) {
            ((MapBean) p).setBufferDirty(true);
            if (Debug.debugging("basic")) {
                Debug.output(getName() + "|Layer: repaint(tm=" + tm + ", x="
                        + x + ", y=" + y + ", width=" + width + ", height="
                        + height + ")");
            }

            // How dangerous is this? Let the MapBean manage the
            // repaint call? Seems to work OK, and lets the buffered
            // MapBeans work better when they are embedded in other
            // components. It's this call here that makes the
            // BufferedLayer work right.

            // This repaint request has been changed to call a
            // specific
            // method on the MapBean, which includes the layer making
            // the request. This is a hook for a policy object in the
            // MapBean to make a decision on whether to honor the
            // request, or to handle it in a different way if the
            // environment dictates that should happen.

            // ((MapBean)p).repaint(); to ->
            ((MapBean) p).repaint(this);
        } else if (p != null) {
            p.repaint(tm, x, y, width, height);
        } else {
            super.repaint(tm, x, y, width, height);
        }
    }
View Full Code Here

     */
    public JFrame getPaletteWindow() {

        if (paletteWindow == null) {
            // create the palette's scroll pane
            Component pal = getGUI();
            if (pal == null)
                pal = new JLabel("No Palette");

            JPanel p = new JPanel();
            p.setLayout(new BoxLayout(p, BoxLayout.Y_AXIS));
View Full Code Here

     *         this EOMG.
     */
    public java.awt.Component getGUI(GraphicAttributes graphicAttributes) {
        Debug.message("eomg", "EditableOMPoly.getGUI");
        if (graphicAttributes != null) {
            Component gaGUI = graphicAttributes.getGUI();
            ((JComponent) gaGUI).add(getTextGUI());
            return gaGUI;
        } else {
            return getTextGUI();
        }
View Full Code Here

    /**
     * Method called when an object is removed from the MapHandler.
     * Called to let menu objects disconnect from it.
     */
    public void findAndUndo(Object someObj) {
        Component menuItems[] = getMenuComponents();

        for (int i = 0; i < menuItems.length; i++) {
            Component item = menuItems[i];
            if (item instanceof LightMapHandlerChild) {
                ((LightMapHandlerChild) item).findAndUndo(someObj);
            }
        }
    }
View Full Code Here

    /**
     * Method called when an object is added from the MapHandler.
     * Called to let menu objects connect to it.
     */
    public void findAndInit(Object someObj) {
        Component menuItems[] = getMenuComponents();

        for (int i = 0; i < menuItems.length; i++) {
            Component item = menuItems[i];
            if (item instanceof LightMapHandlerChild) {
                ((LightMapHandlerChild) item).findAndInit(someObj);
            }
        }
    }
View Full Code Here

      c.setFont(font);
  }

  public void initializeSettings() {
        for (Setting setting : components.keySet()) {
            Component c = components.get(setting);
            Object value = setting.getValue();
            if (c instanceof IComponent) {
                ((IComponent) c).setValue(value);
            } else if (c instanceof JTextComponent) {
                ((JTextField) c).setText(value.toString());
View Full Code Here

TOP

Related Classes of java.awt.Component$AWTTreeLock

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.