Package ca.nengo.ui.lib.world.piccolo.objects

Examples of ca.nengo.ui.lib.world.piccolo.objects.Window$MenuBarHandler


     */
    protected Window getViewerWindow() {
        if (!isViewerWindowVisible()) {

            NodeViewer nodeViewer = createViewerInstance();
            Window viewerWindow = new Window(this, nodeViewer);
            nodeViewer.applyDefaultLayout();

            SwingUtilities.invokeLater(new Runnable() {
                public void run() {
                    if (getWorld() != null) {
View Full Code Here


     * Opens a new instance of Brain View
     */
    public void createBrainViewer() {
        BrainViewer brainViewer = new BrainViewer();

        new Window(this, brainViewer);
        // window.setOffset(0, -brainViewer.getHeight());
        // addChild(brainViewer);
    }
View Full Code Here

     * Opens the Container Viewer
     *
     * @return the Container viewer
     */
    public NodeViewer openViewer() {
        Window viewerWindow = getViewerWindow();
        if (viewerWindow.getWindowState() == WindowState.MINIMIZED) {
            viewerWindow.restoreSavedWindow();
        }
        ((NodeViewer) viewerWindow.getContents()).setJustOpened(true);
        return (NodeViewer) viewerWindow.getContents();
    }
View Full Code Here

        shortcuts.add(new ShortcutKey(MENU_SHORTCUT_KEY_MASK, KeyEvent.VK_0,
            new ZoomToFitAction("Zoom to fit", (WorldImpl)getTopWorld())));
    }

    private World getTopWorld() {
        Window window = getTopWindow();
        if (window != null) {
            WorldObject wo = window.getContents();
            if (wo instanceof World) {
                return (World) wo;
            } else {
                return null;
            }
View Full Code Here

    /**
     * @return Top Node Container available in the Application Window. Null, if
     *          the Top Window is not a Node Container
     */
    private NodeContainer getTopNodeContainer() {
        Window window = getTopWindow();
        NodeContainer nodeContainer = null;

        if (window != null) {
            WorldObject wo = window.getContents();
            if (wo instanceof NodeContainer) {
                nodeContainer = (NodeContainer) wo;
            }
        } else {
            nodeContainer = this;
View Full Code Here

TOP

Related Classes of ca.nengo.ui.lib.world.piccolo.objects.Window$MenuBarHandler

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.