Package org.flexdock.view

Examples of org.flexdock.view.View


            }
        }
    };

    protected View createView( final PageComponent component ) {
        View view = new View( component.getId() );
        view.setTitle( component.getDisplayName() );
        view.setTabText( component.getDisplayName() );
        view.setTabIcon( component.getIcon() );
        view.setIcon( component.getIcon() );
        view.setContentPane( component.getControl() );

        view.getViewProperties().addPropertyChangeListener( activeHandler );

        configureView( component, view, getViewDescriptor( component.getId() ) );

        dockables.put( component.getId(), view );
View Full Code Here


    public View getFlexView( String id ) {
        return dockables.get( id );
    }

    protected void doAddPageComponent( PageComponent pageComponent ) {
        View view = createView( pageComponent );
        dockables.put( pageComponent.getId(), view );

        if( !isLoadingLayout ) {
            DockingManager.display( view );
        }
View Full Code Here

            DockingManager.display( view );
        }
    }

    protected void doRemovePageComponent( PageComponent pageComponent ) {
        View view = getFlexView( pageComponent.getId() );
        if( view != null ) {
            DockingManager.close( (Dockable) view );

            // HACK: if we don't repaint here, when closing the last dockable the ui is
            // not updated
View Full Code Here

    protected boolean giveFocusTo( final PageComponent pageComponent ) {
        if( creatingDockable ) {
            return false;
        }

        View view = getFlexView( pageComponent.getId() );

        view.setActive( true );

        // HACK: otherwise the first dockable that was active will still be active
        for( Iterator iter = DockingManager.getDockableIds().iterator(); iter.hasNext(); ) {
            String id = (String) iter.next();
            if( !id.equals( pageComponent.getId() ) ) {
View Full Code Here

        port.repaint();

        isLoadingLayout = false;

        // mark the view associated with the active component as active
        View view = getFlexView( getActiveComponent().getId() );
        if( view != null ) {
            view.setActive( true );
        }
    }
View Full Code Here

        content.setPreferredSize(new Dimension(800, 600));

        Viewport viewport = new Viewport();
        content.add(viewport, BorderLayout.CENTER);

        View view1 = buildView("themeinfo.view", "Theme Info", buildThemeInfoPane());
        View view2 = buildView("plafchooser.view", "Plaf Chooser", buidViewContentPane());

        viewport.dock(view2);
        view2.dock( view1, EAST_REGION, .2f);

        return content;
    }
View Full Code Here

        return content;
    }

    private View buildView(String id, String name, JComponent component) {
        View view = new View(id, name);
        view.setIcon("org/flexdock/demos/view/titlebar/msvs001.png");
        view.addAction(new EmptyAction(CLOSE_ACTION));
        view.addAction(new EmptyAction(PIN_ACTION));
        view.setContentPane(component);

        return view;
    }
View Full Code Here

        frame.addDockable(createView("class.view", "Class View"));
        return frame;
    }

    private View createView(String id, String text) {
        View view = new View(id, text);
        view.addAction(createAction(CLOSE_ACTION, "Close"));
        view.addAction(createAction(PIN_ACTION, "Pin"));

        JPanel p = new JPanel();
        p.setBackground(Color.WHITE);
        p.setBorder(new LineBorder(Color.GRAY, 1));

        view.setContentPane(p);
        return view;
    }
View Full Code Here

    }

    public DefaultDisplayAction(String viewId) {
        setViewId(viewId);
        View view = View.getInstance(viewId);
        if(view!=null)
            putValue(Action.NAME, view.getTitle());
    }
View Full Code Here

    public static final ViewAction EMPTY_ACTION = createDefault();

    protected String viewId;

    protected View getView(ActionEvent evt) {
        View view = viewId == null ? null : View.getInstance(viewId);
        if (view == null) {
            Component c = (Component) evt.getSource();
            view = (View) SwingUtilities.getAncestorOfClass(View.class, c);
        }
        return view;
View Full Code Here

TOP

Related Classes of org.flexdock.view.View

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.