Package com.bbn.openmap.gui

Examples of com.bbn.openmap.gui.WindowSupport


            if (isVisible()) {
                doPrepare();
            }
        } else if (cmd == ConfigCmd) {
            if (configWindowSupport == null) {
                configWindowSupport = new WindowSupport(new VPFConfig(this), "Configure "
                        + getName() + " Features");
            } else {
                configWindowSupport.setTitle(getName());
            }
            configWindowSupport.displayInWindow();
View Full Code Here


    public void hidePalette() {
        Debug.message("drawingtool", "OMDrawingTool.hidePalette()");

        setVisible(visibleWhenInactive);

        WindowSupport ws = getWindowSupport();
        if (ws != null) {
            ws.killWindow();
        }
    }
View Full Code Here

        }
    }

    public void showInWindow() {
        if (!getUseAsTool() && getWindowSupport() == null) {
            setWindowSupport(new WindowSupport(getGUI(), i18n.get(OMDrawingTool.class,
                    "drawingtool",
                    "Drawing Tool")));
        }

        WindowSupport ws = getWindowSupport();

        if (ws != null && !getUseAsTool()) {
            MapHandler mh = (MapHandler) getBeanContext();
            Frame frame = null;
            int xoffset = 0;
            int yoffset = 0;
            if (mh != null) {
                frame = (Frame) mh.get(java.awt.Frame.class);
                if (frame != null) {
                    xoffset = frame.getX();
                    yoffset = frame.getY();
                }
            }

            ws.displayInWindow(frame, WindowSupport.Dlg.class,
                    windowx + xoffset,
                    windowy + yoffset,
                    -1,
                    -1);
        } else {
View Full Code Here

            windowSupport.killWindow();
            windowSupport = null;
        }

        JComponent comp = createPropertyGUI(propertyConsumer);
        windowSupport = new WindowSupport(comp, "Inspector - " + prefix);
        windowSupport.setMaxSize(-1, 500);
        windowSupport.displayInWindow();
    }
View Full Code Here

     * in an applet environment and will use a JInternalFrame over a JFrame if
     * necessary.
     */
    public void showPalette() {

        WindowSupport ws = getWindowSupport();
        if (ws == null) {
            ws = createWindowSupport();
            paletteListener = new ComponentAdapter() {
                public void componentShown(ComponentEvent e) {
                    firePaletteEvent(e);
                }

                public void componentHidden(ComponentEvent e) {
                    firePaletteEvent(e);
                }
            };
            setWindowSupport(ws);
        } else {
            ws.setTitle(getName());
            ws.setContent(getGUI());
        }

        if (ws != null) {
            MapHandler mh = (MapHandler) getBeanContext();
            Frame frame = null;
            if (mh != null) {
                frame = (Frame) mh.get(java.awt.Frame.class);

                if (frame == null) {
                    MapBean mapBean = (MapBean) mh.get("com.bbn.openmap.MapBean");
                    if (mapBean == null) {
                        Debug.message("layer",
                                "Layer.showPalette: Warning...mapBean = null");
                    } else {
                        try {
                            java.awt.Component parent = mapBean.getParent();
                            while (parent.getParent() != null
                                    && !(parent instanceof java.awt.Frame)) {
                                parent = parent.getParent();
                            }

                            if (parent instanceof java.awt.Frame) {
                                frame = (java.awt.Frame) parent;
                            }

                        } catch (Exception e) {
                            e.printStackTrace();
                        } // ignore any problems here
                    }
                }
            }

            if (paletteListener != null) {
                ws.addComponentListener(paletteListener);
            }
            ws.displayInWindow(frame);
        }
    }
View Full Code Here

    /**
     * Hide the layer's palette.
     */
    public void hidePalette() {
        WindowSupport ws = getWindowSupport();
        if (ws != null) {
            ws.killWindow();
        }
    }
View Full Code Here

    /**
     * Overridden from Layer because we are placing our own scroll pane around
     * the LocationHandler GUIs.
     */
    protected WindowSupport createWindowSupport() {
        return new WindowSupport(getGUI(), getName());
    }
View Full Code Here

            try {
                String internString = i18n.get(this.getClass(),
                        "progressTitle",
                        "Progress");
                plg = new ProgressListenerGauge(internString);
                plg.setWindowSupport(new WindowSupport(plg, new WindowSupport.Frm("", true)));
                addProgressListener(plg);
            } catch (Exception e) {
                // Since ProgressListenerGauge is a Swing component, catch
                // any exception that would be tossed if it can't be
                // created, like if the PropertyHandler is being used on a
View Full Code Here

    public static final String defaultKey = "omdrawingtoollauncher";

    public OMDrawingToolLauncher() {
        super();

        setWindowSupport(new WindowSupport(this, i18n.get(OMDrawingToolLauncher.class,
                "omdrawingtoollauncher",
                "Drawing Tool Launcher")));
        setKey(defaultKey);
        defaultGraphicAttributes.setRenderType(OMGraphic.RENDERTYPE_LATLON);
        defaultGraphicAttributes.setLineType(OMGraphic.LINETYPE_GREATCIRCLE);
View Full Code Here

TOP

Related Classes of com.bbn.openmap.gui.WindowSupport

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.