Package org.noos.xing.mydoggy

Examples of org.noos.xing.mydoggy.ToolWindowAction


            throw new IllegalArgumentException("The action cannot be null.");

//        if (getToolWindowAction(toolWindowAction.getId()) != null)
//            throw new IllegalArgumentException("The action is already registered.");

        ToolWindowAction oldToolWindowAction = toolWindowActionMap.get(toolWindowAction.getId());
        if (oldToolWindowAction != null) {
            if (!toolWindowDescriptor.containsToolWindowAction(this, oldToolWindowAction.getId()))
                oldToolWindowAction.setToolWindow(null);
        }

        if (!toolWindowDescriptor.containsToolWindowAction(this, toolWindowAction))
            toolWindowAction.setToolWindow(toolWindowDescriptor.getToolWindow());
View Full Code Here


    public void removeToolWindowAction(String id) {
        if (toolWindowActionMap.get(id) instanceof PlafToolWindowAction)
            throw new IllegalArgumentException("Cannot remove a system action.");

        ToolWindowAction toolWindowAction = toolWindowActionMap.remove(id);
        if (toolWindowAction != null) {
            if (!toolWindowDescriptor.containsToolWindowAction(this, toolWindowAction.getId()))
                toolWindowAction.setToolWindow(null);
        }

        firePropertyChangeEvent("toolWindowAction", toolWindowAction, null, new Object[]{this});
    }
View Full Code Here

    public void propertyChange(PropertyChangeEvent evt) {
        String propertyName = evt.getPropertyName();

        if ("visibleOnTitleBar".equals(propertyName)) {
            ToolWindowAction toolWindowAction = (ToolWindowAction) evt.getSource();

            if (!setVisible((Component) toolWindowAction.getValue("component"), (Boolean) evt.getNewValue())) {
                Integer index = (Integer) toolWindowAction.getValue("constraint");
                addToolWindowAction(toolWindowAction, index != null ? index : -1);
                setVisible((Component) toolWindowAction.getValue("component"), (Boolean) evt.getNewValue());
            }
        } else if ("toolWindowAction".equals(propertyName)) {
            if (SwingUtil.getAt(evt, 0, null) != toolWindow.getTypeDescriptor(toolWindow.getType()))
                return;

            if (evt.getNewValue() != null) {
                if (evt.getOldValue() == null) {
                    // Add the action
                    ToolWindowAction toolWindowAction = (ToolWindowAction) evt.getNewValue();
                    if (toolWindowAction.isVisibleOnTitleBar()) {

                        int index = (Integer) toolWindowAction.getValue("constraint");
                        addToolWindowAction(toolWindowAction, index);

                        SwingUtil.repaint(toolWindowTitleButtonPanel);
                    }
                } else {
View Full Code Here

TOP

Related Classes of org.noos.xing.mydoggy.ToolWindowAction

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.