Package org.noos.xing.mydoggy.plaf.ui

Examples of org.noos.xing.mydoggy.plaf.ui.ToolWindowDescriptor


        }
        return false;
    }

    public synchronized void propertyChange(final PropertyChangeEvent evt) {
        ToolWindowDescriptor descriptor = (ToolWindowDescriptor) evt.getSource();

        if (!tools.containsValue(descriptor)) {
//            System.out.println("Manager doesn't containe that ToolWindow. [id : " + descriptor.getToolWindow().getId() + "]");
            new RuntimeException("Manager doesn't containe that ToolWindow. [id : " + descriptor.getToolWindow().getId() + "]").printStackTrace();
            return;
        }

        propertyChangeSupport.firePropertyChangeEvent(evt);
    }
View Full Code Here


  }


  class AvailablePropertyChangeListener implements PropertyChangeListener {
        public void propertyChange(PropertyChangeEvent evt) {
            ToolWindowDescriptor window = (ToolWindowDescriptor) evt.getSource();

            // Notify specific bar
            getBar(window.getToolWindow().getAnchor()).propertyChange(evt);

            // Syncronize bars panel
            syncPanel(window.getToolWindow().getAnchor());
        }
View Full Code Here

        }
    }

    class VisiblePropertyChangeListener implements PropertyChangeListener {
        public void propertyChange(PropertyChangeEvent evt) {
            ToolWindowDescriptor window = (ToolWindowDescriptor) evt.getSource();

            // Fire "visible.before" to all bars
            PropertyChangeEvent event = new PropertyChangeEvent(evt.getSource(), "visible.before",
                                                                evt.getOldValue(), evt.getNewValue());
            for (MyDoggyToolWindowBar bar : bars)
                bar.propertyChange(event);

            // Fire "visible" to specific bar
            getBar(window.getToolWindow().getAnchor()).propertyChange(evt);

            // Syncronize bars panel
            syncPanel(window.getToolWindow().getAnchor());
        }
View Full Code Here

    }

  class ActivePropertyChangeListener implements PropertyChangeListener {

    public synchronized void propertyChange(PropertyChangeEvent evt) {
      ToolWindowDescriptor descriptor = (ToolWindowDescriptor) evt.getSource();

            // Fire "active.before" for all bars
            PropertyChangeEvent event = new PropertyChangeEvent(evt.getSource(), "active.before",
                                                                evt.getOldValue(), evt.getNewValue());
            for (MyDoggyToolWindowBar bar : bars)
                bar.propertyChange(event);

      // Fire "active" for specific bar
            getBar(descriptor.getToolWindow().getAnchor()).propertyChange(evt);

            if (Boolean.FALSE.equals(evt.getNewValue())) {
                activeToolWindowId = null;

        if (last != null) {
          boolean shouldRequest = true;
          for (MyDoggyToolWindowBar bar : bars) {
            if (bar.valueAdjusting && getBar(descriptor.getToolWindow().getAnchor()) == bar) {
              shouldRequest = false;
              break;
            }
          }
          if (shouldRequest) {
            last.requestFocusInWindow();
          }
        }
      } else activeToolWindowId = descriptor.getToolWindow().getId();
    }
View Full Code Here

    }
    }

    class AnchorPropertyChangeListener implements PropertyChangeListener {
        public void propertyChange(PropertyChangeEvent evt) {
            ToolWindowDescriptor window = (ToolWindowDescriptor) evt.getSource();

            ToolWindowType windowType = window.getToolWindow().getType();
            if (windowType == ToolWindowType.FLOATING || windowType == ToolWindowType.FLOATING_FREE) {
                ToolWindowAnchor oldAnchor = (ToolWindowAnchor) evt.getOldValue();
                ToolWindowAnchor newAnchor = (ToolWindowAnchor) evt.getNewValue();

                PropertyChangeEvent avEvent = new PropertyChangeEvent(evt.getSource(), "available", true, false);
View Full Code Here

        }
    }

    class TypePropertyChangeListener implements PropertyChangeListener {
        public void propertyChange(PropertyChangeEvent evt) {
            ToolWindowDescriptor window = (ToolWindowDescriptor) evt.getSource();

            getBar(window.getToolWindow().getAnchor()).propertyChange(evt);

            for (ToolWindowDescriptor tool : tools.values())
                tool.getToolWindowContainer().propertyChange(evt);

            syncPanel(window.getToolWindow().getAnchor());
        }
View Full Code Here

        }
    }

    class IndexChangeListener implements PropertyChangeListener {
        public void propertyChange(PropertyChangeEvent evt) {
            ToolWindowDescriptor descriptor = (ToolWindowDescriptor) evt.getSource();
            ToolWindow modifiedTool = descriptor.getToolWindow();

            int newIndex = (Integer) evt.getNewValue();

            if (newIndex > 0) {
                for (ToolWindow toolWindow : getToolWindows()) {
                    if (toolWindow != modifiedTool && toolWindow.getIndex() == newIndex) {
                        toolWindow.setIndex(-1);
                        break;
                    }
                }
            }

            descriptor.propertyChange(evt);
            getBar(modifiedTool.getAnchor()).propertyChange(evt);
        }
View Full Code Here

                                String title, Icon icon, Component component,
                                ResourceBundle resourceBundle) {
        this.internalListenerList = new EventListenerList();
        this.listenerList = new EventListenerList();

        this.descriptor = new ToolWindowDescriptor(manager, this, anchestor);
        this.resourceBundle = resourceBundle;
        this.toolWindowTabs = new ArrayList<ToolWindowTab>();

        rootTab = addTabInternal(title, null, component, null, true);
View Full Code Here

        }
    }

    class IconChangeListener implements PropertyChangeListener {
        public void propertyChange(PropertyChangeEvent evt) {
            ToolWindowDescriptor descriptor = (ToolWindowDescriptor) evt.getSource();

            descriptor.propertyChange(evt);
            getBar(descriptor.getToolWindow().getAnchor()).propertyChange(evt);
        }
View Full Code Here

        }
    }

    class TitleChangeListener implements PropertyChangeListener {
        public void propertyChange(PropertyChangeEvent evt) {
            ToolWindowDescriptor descriptor = (ToolWindowDescriptor) evt.getSource();

            descriptor.propertyChange(evt);
            getBar(descriptor.getToolWindow().getAnchor()).propertyChange(evt);
        }
View Full Code Here

TOP

Related Classes of org.noos.xing.mydoggy.plaf.ui.ToolWindowDescriptor

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.