Examples of JDesktopIcon


Examples of javax.swing.JInternalFrame.JDesktopIcon

      }
      return frames.length == 0? null: frames[0];
    }
   
    private void removeIcon(JInternalFrame frame) {
      JDesktopIcon icon = frame.getDesktopIcon();
      Container parent = icon.getParent();
      if (parent != null) {
        parent.remove(icon);
      }
    }
View Full Code Here

Examples of javax.swing.JInternalFrame.JDesktopIcon

    DockLayout layout = (DockLayout)parent.getLayout();
    layout.minimizeLayoutComponent(child);
    }

    public void iconifyFrame(JInternalFrame frame) {
        JDesktopIcon icon = frame.getDesktopIcon();
        JDesktopPane desktop = frame.getDesktopPane();
        DockLayout layout = (DockLayout)desktop.getLayout();
        if (frame.isMaximum()) {
          layout.minimizeLayoutComponent(frame);
        }
View Full Code Here

Examples of javax.swing.JInternalFrame.JDesktopIcon

        frame.setVisible(false);
        desktop.add(icon);
    }

    public void deiconifyFrame(JInternalFrame frame) {
        JDesktopIcon icon = frame.getDesktopIcon();
        Container parent = icon.getParent();
        if (parent != null) {
          parent.remove(icon);
          for (Component component: parent.getComponents()) {
            if (component instanceof JInternalFrame && ((JInternalFrame)component).isMaximum()) {
              try {
View Full Code Here

Examples of javax.swing.JInternalFrame.JDesktopIcon

        DockingTabbedPane tabbedPane = (DockingTabbedPane)child;
        int tabIndex = tabbedPane.getTabIndex(frame);
        frame.putClientProperty(TABBED_PANE_PROPERTY, tabbedPane);
        tabbedPane.removeTabAt(tabIndex);
        handleRemoveLastTab(tabbedPane);
        JDesktopIcon icon = frame.getDesktopIcon();
        if (desktop != null) {
          desktop.add(icon);
        }
      } else if (frame.getClientProperty(TABBED_PANE_PROPERTY) != null) {
        DockingTabbedPane tabbedPane = (DockingTabbedPane)frame.getClientProperty(TABBED_PANE_PROPERTY);
View Full Code Here

Examples of javax.swing.JInternalFrame.JDesktopIcon

      }
    }

    public void deiconifyFrame(JInternalFrame frame) {
      if (frame.getClientProperty(TABBED_PANE_PROPERTY) != null) {
            JDesktopIcon icon = frame.getDesktopIcon();
            Container parent = icon.getParent();
            if (parent != null) {
              parent.remove(icon);
            }
            frame.setVisible(true);
            DockingTabbedPane tabbedPane = (DockingTabbedPane)frame.getClientProperty(TABBED_PANE_PROPERTY);
            handleAddTab(tabbedPane);
            frame.putClientProperty(TABBED_PANE_PROPERTY, null);
            tabbedPane.addTab(frame);
            if (frame.isMaximum()) {
              DockLayout layout = (DockLayout)parent.getLayout();
              layout.maximizeLayoutComponent(tabbedPane);
              ((JLayeredPane)parent).moveToFront(tabbedPane);
            }
          handleRemoveLastTab(tabbedPane); //In certain circumstances the added tab was the first
            setSelected(frame);       
      } else {
            JDesktopIcon icon = frame.getDesktopIcon();
            Container parent = icon.getParent();
            JInternalFrame maximizedFrame = null;
            for (Component component: parent.getComponents()) {
              maximizedFrame = getInternalFrame(component);
              if (maximizedFrame != null && maximizedFrame.isVisible() && maximizedFrame.isMaximum()) {
                break;
View Full Code Here

Examples of javax.swing.JInternalFrame.JDesktopIcon

    this.substancePropertyListener = new PropertyChangeListener() {
      public void propertyChange(PropertyChangeEvent evt) {
        if (JInternalFrame.IS_CLOSED_PROPERTY.equals(evt
            .getPropertyName())) {
          titlePane.uninstall();
          JDesktopIcon jdi = frame.getDesktopIcon();
          SubstanceDesktopIconUI ui = (SubstanceDesktopIconUI) jdi
              .getUI();
          ui.uninstallIfNecessary(jdi);
        }

        if ("background".equals(evt.getPropertyName())) {
          Color newBackgr = (Color) evt.getNewValue();
          if (!(newBackgr instanceof UIResource)) {
            getTitlePane().setBackground(newBackgr);
            frame.getDesktopIcon().setBackground(newBackgr);
          }
        }

        if ("ancestor".equals(evt.getPropertyName())) {
          // fix for issue 344 - reopening an internal frame
          // that has been closed.
          JDesktopIcon jdi = frame.getDesktopIcon();
          SubstanceDesktopIconUI ui = (SubstanceDesktopIconUI) jdi
              .getUI();
          ui.installIfNecessary(jdi);
        }
      }
    };
View Full Code Here

Examples of javax.swing.JInternalFrame.JDesktopIcon

    JInternalFrame hostFrame = (JInternalFrame) SwingUtilities
        .getAncestorOfClass(JInternalFrame.class, this);
    JComponent hostForColorization = hostFrame;
    if (hostFrame == null) {
      // try desktop icon
      JDesktopIcon desktopIcon = (JDesktopIcon) SwingUtilities
          .getAncestorOfClass(JDesktopIcon.class, this);
      if (desktopIcon != null)
        hostFrame = desktopIcon.getInternalFrame();
      hostForColorization = desktopIcon;
    }
    // if ((hostFrame != null) && SubstanceCoreUtilities.hasColorization(
    // this)) {
    Color backgr = hostFrame.getBackground();
View Full Code Here

Examples of javax.swing.JInternalFrame.JDesktopIcon

    this.substancePropertyListener = new PropertyChangeListener() {
      public void propertyChange(PropertyChangeEvent evt) {
        if (JInternalFrame.IS_CLOSED_PROPERTY.equals(evt
            .getPropertyName())) {
          titlePane.uninstall();
          JDesktopIcon jdi = frame.getDesktopIcon();
          SubstanceDesktopIconUI ui = (SubstanceDesktopIconUI) jdi
              .getUI();
          ui.uninstallIfNecessary(jdi);
        }

        if ("background".equals(evt.getPropertyName())) {
          Color newBackgr = (Color) evt.getNewValue();
          if (!(newBackgr instanceof UIResource)) {
            getTitlePane().setBackground(newBackgr);
            frame.getDesktopIcon().setBackground(newBackgr);
          }
        }

        if ("ancestor".equals(evt.getPropertyName())) {
          // fix for issue 344 - reopening an internal frame
          // that has been closed.
          JDesktopIcon jdi = frame.getDesktopIcon();
          SubstanceDesktopIconUI ui = (SubstanceDesktopIconUI) jdi
              .getUI();
          ui.installIfNecessary(jdi);
        }
      }
    };
View Full Code Here

Examples of javax.swing.JInternalFrame.JDesktopIcon

              .equals(jrp
                  .getClientProperty(SubstanceLookAndFeel.WINDOW_MODIFIED));
          break;
        }
        if (comp instanceof JDesktopIcon) {
          JDesktopIcon jdi = (JDesktopIcon) comp;
          JInternalFrame jif = jdi.getInternalFrame();
          isWindowModified = Boolean.TRUE
              .equals(jif
                  .getClientProperty(SubstanceLookAndFeel.WINDOW_MODIFIED));
          break;
        }
View Full Code Here

Examples of javax.swing.JInternalFrame.JDesktopIcon

              .equals(jrp
                  .getClientProperty(SubstanceLookAndFeel.WINDOW_MODIFIED));
          break;
        }
        if (comp instanceof JDesktopIcon) {
          JDesktopIcon jdi = (JDesktopIcon) comp;
          JInternalFrame jif = jdi.getInternalFrame();
          isWindowModified = Boolean.TRUE
              .equals(jif
                  .getClientProperty(SubstanceLookAndFeel.WINDOW_MODIFIED));
          break;
        }
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.