Package javax.swing

Examples of javax.swing.JInternalFrame$JDesktopIcon


    }
    return mainDesktopPane;
  }

  private void setupShowSysInfoThread() {
    final JInternalFrame tinaFrame = getTinaInternalFrame();
    final String title = tinaFrame.getTitle();
    new Thread(new Runnable() {

      @Override
      public void run() {
        while (true) {
          try {
            SystemInfo sysInfo = new SystemInfo();
            tinaFrame.setTitle(title + "(" + sysInfo.getUsedMemMB() + "MB / " + sysInfo.getMaxMemMB() + "MB)");
            Thread.sleep(1000);
          }
          catch (InterruptedException e) {
            e.printStackTrace();
          }
View Full Code Here


    if (pDesktop != null) {
      pnl = new ImagePanel(img, 0, 0, panelWidth);

      pnl.setLayout(null);

      internalFrame = new JInternalFrame();
      internalFrame.setTitle(getTitle(panelWidth));
      internalFrame.setClosable(true);
      internalFrame.setMaximizable(true);
      internalFrame.setIconifiable(true);
      internalFrame.setResizable(true);
View Full Code Here

    bufferType = BufferType.MESH3D;
    name = pName;

    if (pDesktop != null) {
      internalFrame = new JInternalFrame();

      internalFrame.setTitle(pName + " (" + mesh3D.getPCount() + " points, " + mesh3D.getFCount()
          + " faces)");
      internalFrame.setClosable(true);
      internalFrame.setMaximizable(true);
View Full Code Here

   * @return the created frame.
   */
  @RunsInCurrentThread
  protected static JInternalFrame createInternalFrame() {
    // TODO: should be create and add
    JInternalFrame internalFrame = new JInternalFrame(concat("Internal Frame ", ++internalFrameCounter));
    internalFrame.setIconifiable(true);
    internalFrame.setMaximizable(true);
    internalFrame.setResizable(true);
    internalFrame.setSize(new Dimension(200, 100));
    internalFrame.setVisible(true);
    return internalFrame;
  }
View Full Code Here

  @Test
  public void should_fail_if_JInternalFrame_is_not_resizable() {
    TestMdiWindow w = TestMdiWindow.createNewWindow(getClass());
    robot.showWindow(w);
    JInternalFrame i = w.internalFrame();
    makeNotResizable(i);
    robot.waitForIdle();
    try {
      checkCanResize(i);
      failWhenExpectingException();
View Full Code Here

  @RunsInCurrentThread
  private @Nonnull Collection<Component> internalFramesFromIcons(@Nonnull Container c) {
    Collection<Component> frames = newArrayList();
    for (Component child : c.getComponents()) {
      if (child instanceof JDesktopIcon) {
        JInternalFrame frame = ((JDesktopIcon) child).getInternalFrame();
        if (frame != null) {
          frames.add(frame);
        }
        continue;
      }
View Full Code Here

    @RunsInEDT
    public JInternalFrame createNew() {
      return execute(new GuiQuery<JInternalFrame>() {
        @Override
        protected JInternalFrame executeInEDT() {
          JInternalFrame internalFrame = new JInternalFrame();
          internalFrame.setName(name);
          internalFrame.setResizable(resizable);
          return internalFrame;
        }
      });
    }
View Full Code Here

  }

  @Test
  public void should_return_parent_of_JInternalFrame() {
    TestMdiWindow window = TestMdiWindow.createNewWindow(getClass());
    JInternalFrame internalFrame = window.internalFrame();
    try {
      assertThat(findParent(finder, internalFrame)).isNotNull().isSameAs(desktopPaneOf(internalFrame));
    } finally {
      window.destroy();
    }
View Full Code Here

              .getComponent(), "Fax"));
        } else if (owner instanceof JFrameAdapter) {
          window = new JDialogAdapter(new JDialog((JFrame) owner
              .getComponent(), "Fax"));
        } else {
          window = new JInternalFrameAdapter(new JInternalFrame(
              "Fax", true, true, true, true));
          ProTransMain.PRO_TRANS_MAIN.addInternalFrame(window);
        }

        window.add(reportViewer.buildPanel(window));
View Full Code Here

        }
    }

    public void processJInternalFrameEvent(BridgeComponentPeer peer, BridgeInputContext context, Map inputForm)
    {
        JInternalFrame f = (JInternalFrame) peer.getComponent();
        String value = (String) inputForm.get(peer.getId());
        try
        {
            if ("close".equals(value))
            {
                f.setClosed(true);
            } else if ("maximize".equals(value))
            {
                f.setMaximum(!f.isMaximum());
            } else if ("minimize".equals(value))
            {
                f.setIcon(!f.isIcon());
            } else
            {
                _logger.warning("Unknown action " + value + " to frame");
            }
        } catch (PropertyVetoException e)
View Full Code Here

TOP

Related Classes of javax.swing.JInternalFrame$JDesktopIcon

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.