Package org.noos.xing.mydoggy

Examples of org.noos.xing.mydoggy.ToolWindow


                dtde.acceptDrop(DnDConstants.ACTION_MOVE);
                // Chech if it was a tab
                if (content.getDockableDelegator() != null) {
                    if (content.getDockableDelegator() instanceof ToolWindow) {
                        ToolWindow toolWindow = (ToolWindow) content.getDockableDelegator();

                        manager.getContentManager().removeContent(content);

                        toolWindow.setAnchor(anchor, index);
                        toolWindow.setActive(true);
                    }
                }

                dtde.dropComplete(true);
            } catch (Exception e) {
View Full Code Here


    }

    public void contextChange(ViewContextChangeEvent evt) {
        if (ToolWindowTypeDescriptor.class.equals(evt.getProperty())) {
            if (DockedTypeDescriptor.class.equals(evt.getNewValue())) {
                ToolWindow toolWindow = viewContext.get(ToolWindow.class);

                if (toolWindow == null)
                    return;


                DockedTypeDescriptor descriptor = toolWindow.getTypeDescriptor(DockedTypeDescriptor.class);
                viewContext.put(DockedTypeDescriptor.class, descriptor);

                popupMenuEnabled.setSelected(descriptor.isPopupMenuEnabled());
                hideLabelOnVisible.setSelected(descriptor.isHideRepresentativeButtonOnVisible());
                idVisibleOnTitleBar.setSelected(descriptor.isIdVisibleOnTitleBar());
View Full Code Here

    }

    public void contextChange(ViewContextChangeEvent evt) {
        if (ToolWindowTypeDescriptor.class.equals(evt.getProperty())) {
            if (SlidingTypeDescriptor.class.equals(evt.getNewValue())) {
                ToolWindow toolWindow = viewContext.get(ToolWindow.class);
                SlidingTypeDescriptor descriptor = (SlidingTypeDescriptor) toolWindow.getTypeDescriptor(ToolWindowType.SLIDING);
                viewContext.put(SlidingTypeDescriptor.class, descriptor);

                enabled.setSelected(descriptor.isEnabled());
                animating.setSelected(descriptor.isAnimating());
                idVisibleOnTitleBar.setSelected(descriptor.isIdVisibleOnTitleBar());
View Full Code Here

    }

    public void contextChange(ViewContextChangeEvent evt) {
        if (ToolWindowTypeDescriptor.class.equals(evt.getProperty())) {
            if (FloatingTypeDescriptor.class.equals(evt.getNewValue())) {
                ToolWindow toolWindow = viewContext.get(ToolWindow.class);
                FloatingTypeDescriptor descriptor = (FloatingTypeDescriptor) toolWindow.getTypeDescriptor(ToolWindowType.FLOATING);
                viewContext.put(FloatingTypeDescriptor.class, descriptor);

                enabledBox.setSelected(descriptor.isEnabled());
                modal.setSelected(descriptor.isModal());
                animating.setSelected(descriptor.isAnimating());
View Full Code Here


    protected void initListeners() {
        viewContext.addViewContextChangeListener(ToolWindow.class, new ViewContextChangeListener() {
            public void contextChange(ViewContextChangeEvent evt) {
                ToolWindow toolWindow = (ToolWindow) evt.getNewValue();

                if (toolWindow != null)
                    mainPanel.setBorder(new TitledBorder("Preference : " + toolWindow.getId()));
                else
                    mainPanel.setBorder(new TitledBorder("Preference : "));
            }
        });
    }
View Full Code Here

   * @param act
   */
  private void configureTools(MyDoggyToolWindowManager toolWindowManager) {
    // tool1 - unactive
    if (MAction.MYDOGGY_UNACTIV.equals(act)) {
      ToolWindow tool1 = toolWindowManager.registerToolWindow("1", "Tool 1", null, new JButton("Tool 1"), ToolWindowAnchor.LEFT);
      tool1.setAvailable(true);
    }

    // tool2 - active
    if (MAction.MYDOGGY_ACTIV.equals(act)) {
      JPanel pane2 = new JPanel(new BorderLayout());
      pane2.add(new JComboBox(new String[] { "coucou1", "coucou2", "taratata1", "taratata2" }), BorderLayout.NORTH);
      pane2.add(new JButton("Tool 2"), BorderLayout.CENTER);
      final ToolWindow tool2 = toolWindowManager.registerToolWindow("2", "Tool 2", null, pane2, ToolWindowAnchor.LEFT);
      tool2.setAvailable(true);
            SwingUtilities.invokeLater(new Runnable() {
                public void run() {
                    tool2.setType(ToolWindowType.SLIDING);
                    tool2.setActive(true);
                }
            });
    }

    // tool3 - flashing
    if (MAction.MYDOGGY_FLASHING.equals(act)) {
      final ToolWindow tool3 = toolWindowManager.registerToolWindow("3", "Tool 3", null, new JButton("Tool 3"), ToolWindowAnchor.TOP);
      tool3.setAvailable(true);
      SwingUtilities.invokeLater(new Runnable() {
        public void run() {
          tool3.setFlashing(true);
        }
      });
    }
  }
View Full Code Here

    }

    public void contextChange(ViewContextChangeEvent evt) {
        if (ToolWindowTypeDescriptor.class.equals(evt.getProperty())) {
            if (FloatingLiveTypeDescriptor.class.equals(evt.getNewValue())) {
                ToolWindow toolWindow = viewContext.get(ToolWindow.class);
                FloatingLiveTypeDescriptor descriptor = (FloatingLiveTypeDescriptor) toolWindow.getTypeDescriptor(ToolWindowType.FLOATING_LIVE);
                viewContext.put(FloatingLiveTypeDescriptor.class, descriptor);

                enabledBox.setSelected(descriptor.isEnabled());
                animating.setSelected(descriptor.isAnimating());
                idVisibleOnTitleBar.setSelected(descriptor.isIdVisibleOnTitleBar());
View Full Code Here

    }


    public void propertyChange(final PropertyChangeEvent evt) {
        if ("active".equals(evt.getPropertyName())) {
            ToolWindow toolWindow = (ToolWindow) evt.getSource();
            FloatingTypeDescriptor typeDescriptor = toolWindow.getTypeDescriptor(FloatingTypeDescriptor.class);

            if (transparencyTimer != null) {
                transparencyTimer.stop();
                if (transparencyAnimation.isAnimating()) {
                    synchronized (transparencyManager) {
View Full Code Here

    }


    public void propertyChange(final PropertyChangeEvent evt) {
        if ("active".equals(evt.getPropertyName())) {
            ToolWindow toolWindow = (ToolWindow) evt.getSource();
            FloatingTypeDescriptor typeDescriptor = toolWindow.getTypeDescriptor(FloatingTypeDescriptor.class);

            if (transparencyTimer != null) {
                transparencyTimer.stop();
                if (transparencyAnimation.isAnimating()) {
                    synchronized (FloatingFrame.this) {
View Full Code Here


    public ToolWindowPanel(ToolWindowDescriptor toolWindowDescriptor) {
        this.toolWindowDescriptor = toolWindowDescriptor;

        ToolWindow toolWindow = toolWindowDescriptor.getToolWindow();

        setName("toolWindow.container." + toolWindow.getId());
        setFocusTraversalPolicyProvider(true);
        setFocusTraversalPolicy(new ContainerOrderFocusTraversalPolicy());
        setFocusable(false);
        putClientProperty(ToolWindow.class, toolWindowDescriptor.getToolWindow());

        // Title Bar
        toolWindowTitleBar = new ToolWindowTitleBar(toolWindowDescriptor);
        toolWindowTitleBar.setName("toolWindow.titleBar." + toolWindow.getId());
        toolWindowTitleBar.setEnabled(false);
        toolWindowTitleBar.setFocusable(false);

        // Set Component container
        componentContainer = new JPanel();
View Full Code Here

TOP

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

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.