javax.swing.JInternalFrame.setMaximum()方法的使用及代码示例

x33g5p2x  于2022-01-21 转载在 其他  
字(6.7k)|赞(0)|评价(0)|浏览(202)

本文整理了Java中javax.swing.JInternalFrame.setMaximum()方法的一些代码示例,展示了JInternalFrame.setMaximum()的具体用法。这些代码示例主要来源于Github/Stackoverflow/Maven等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。JInternalFrame.setMaximum()方法的具体详情如下:
包路径:javax.swing.JInternalFrame
类名称:JInternalFrame
方法名:setMaximum

JInternalFrame.setMaximum介绍

暂无

代码示例

代码示例来源:origin: chewiebug/GCViewer

public void actionPerformed(final ActionEvent e) {
    final JInternalFrame[] frames = gcViewer.getDesktopPane().getAllFrames();
    final DesktopManager desktopManager = gcViewer.getDesktopPane().getDesktopManager();
    for (int i=0; i<frames.length; i++) {
      final JInternalFrame frame = frames[i];
      desktopManager.deiconifyFrame(frame);
      try {
        frame.setMaximum(false);
      } 
      catch (PropertyVetoException e1) {
        e1.printStackTrace();
      }
      final int height = gcViewer.getDesktopPane().getHeight()/frames.length;
      desktopManager.setBoundsForFrame(frame, 0, height * i, gcViewer.getDesktopPane().getWidth(), height);
    }
  }
}

代码示例来源:origin: pentaho/mondrian

private void maximizeMenuItemActionPerformed(
  ActionEvent evt)
{
  try {
    for (JInternalFrame sf : getAllFrames()) {
      if (sf != null) {
        sf.setIcon(false);
        sf.setMaximum(true);
      }
    }
  } catch (Exception ex) {
    LOGGER.error("maximizeMenuItemActionPerformed", ex);
    // do nothing
  }
}

代码示例来源:origin: pentaho/mondrian

for (JInternalFrame sf : getAllFrames()) {
  if (sf != null && !sf.isIcon()) {
    sf.setMaximum(false);
    sf.moveToFront();
    if (x >= desktopW

代码示例来源:origin: pentaho/mondrian

private void cascadeMenuItemActionPerformed(
  ActionEvent evt)
{
  try {
    int sfi = 1;
    for (JInternalFrame sf : getAllFrames()) {
      if (sf != null && !sf.isIcon()) {
        sf.setMaximum(false);
        sf.setLocation(30 * sfi, 30 * sfi);
        sf.moveToFront();
        sf.setSelected(true);
        sfi++;
      }
    }
  } catch (Exception ex) {
    LOGGER.error("cascadeMenuItemActionPerformed", ex);
    // do nothing
  }
}

代码示例来源:origin: abbot/abbot

public void run() {
    try {
      frame.setMaximum(b);
    }
    catch(PropertyVetoException e) {
      veto.e = e;
    }
  }
});

代码示例来源:origin: net.sf.squirrel-sql.thirdparty-non-maven/skinlf

/**
 * Sets the Maximum attribute of the InternalFrameWindow object
 * 
 * @param b The new Maximum value
 * @exception PropertyVetoException Description of Exception
 */
public void setMaximum(boolean b) throws PropertyVetoException {
 frame.setMaximum(b);
}

代码示例来源:origin: pentaho/mondrian

schemaFrame, javax.swing.JLayeredPane.DEFAULT_LAYER);
schemaFrame.show();
schemaFrame.setMaximum(true);

代码示例来源:origin: stackoverflow.com

JInternalFrame frame = ...
frame..setMaximum(true); // Maximize this window to fill up the whole desktop area

代码示例来源:origin: robotframework/SwingLibrary

private void maximize(String identifier, boolean shouldMaximize) {
  try {
    ((JInternalFrame) createOperator(identifier).getSource())
        .setMaximum(shouldMaximize);
  } catch (PropertyVetoException e) {
    throw new RuntimeException(e);
  }
}

代码示例来源:origin: senbox-org/snap-desktop

@Override
  public void actionPerformed(ActionEvent e) {
    TabData tab = tabbedContainer.getModel().getTab(tabIndex);
    JInternalFrame internalFrame = tabToFrameMap.get(tab);
    try {
      internalFrame.setMaximum(true);
    } catch (PropertyVetoException e1) {
      // ok
    }
  }
}

代码示例来源:origin: joel-costigliola/assertj-swing

@RunsInEDT
static void setMaximum(final @Nonnull JInternalFrame internalFrame, final @Nonnull JInternalFrameAction action) {
 execute(() -> {
  internalFrame.setIcon(false);
  internalFrame.setMaximum(action.value);
 });
}

代码示例来源:origin: joel-costigliola/assertj-swing

@RunsInEDT
static void setIcon(final @Nonnull JInternalFrame internalFrame, final @Nonnull JInternalFrameAction action) {
 execute(() -> {
  internalFrame.setMaximum(false);
  internalFrame.setIcon(action.value);
 });
}

代码示例来源:origin: stackoverflow.com

public void moveFrame()
{
 JInternalFrame selectedFrame = desktopPane.getSelectedFrame();
 Dimension currentSize = selectedFrame.getSize();
 try
 {
  selectedFrame.setMaximum(false);
 }
 catch (PropertyVetoException ex)
 {
  ex.printStackTrace();
 }
 selectedFrame.setSize(currentSize);

 desktopPane.remove(selectedFrame);
 desktopPane.repaint();
 secondFrame.addInternalFrame(selectedFrame);
}

代码示例来源:origin: com.eas.platypus/platypus-js-forms

@ScriptFunction(jsDoc = RESTORE_ALL_JSDOC)
public void restoreAll() throws PropertyVetoException {
  for (JInternalFrame f : getAllFrames()) {
    if (f.isIcon()) {
      f.setIcon(false);
    }
    if (f.isMaximum()) {
      f.setMaximum(false);
    }
  }
}

代码示例来源:origin: com.eas.platypus/platypus-js-forms

@ScriptFunction(jsDoc = MAXIMIZE_ALL_JSDOC)
public void maximizeAll() throws PropertyVetoException {
  for (JInternalFrame f : getAllFrames()) {
    if (f.isIcon()) {
      f.setIcon(false);
    }
    if (f.isMaximizable()) {
      f.setMaximum(true);
    }
  }
}

代码示例来源:origin: net.imagej/ij-ui-swing

public void tileFramesVertically() {
  Component[] allFrames = getAllFrames();
  
  // do nothing if no frames to work with
  if (allFrames.length == 0) {
    return;
  }
  manager.setNormalSize();
  
  int frameWidth = getBounds().width/allFrames.length;
  int x = 0;
  for (int i = 0; i < allFrames.length; i++) {
    try {
      ((JInternalFrame)allFrames[i]).setMaximum(false);
    } catch (PropertyVetoException e) {
      e.printStackTrace();
    }
    
    allFrames[i].setBounds(x, 0, frameWidth, getBounds().height);
    x = x + frameWidth;
  }
  
  checkDesktopSize();
}

代码示例来源:origin: net.imagej/ij-ui-swing

public void tileFramesHorizontally() {
  Component[] allFrames = getAllFrames();
  
  // do nothing if no frames to work with
  if (allFrames.length == 0) {
    return;
  }
  
  manager.setNormalSize();
  
  int frameHeight = getBounds().height/allFrames.length;
  int y = 0;
  for (int i = 0; i < allFrames.length; i++) {
    try {
      ((JInternalFrame)allFrames[i]).setMaximum(false);
    } catch (PropertyVetoException e) {
      e.printStackTrace();
    }
    
    allFrames[i].setBounds(0, y, getBounds().width,frameHeight);
    y = y + frameHeight;
  }
  
  checkDesktopSize();
}

代码示例来源:origin: org.opentcs.thirdparty.jhotdraw/jhotdraw

public void tileFramesVertically() {
  Component[] allFrames = getAllFrames();
  
  // do nothing if no frames to work with
  if (allFrames.length == 0) {
    return;
  }
  manager.setNormalSize();
  
  int frameWidth = getBounds().width/allFrames.length;
  int x = 0;
  for (int i = 0; i < allFrames.length; i++) {
    try {
      ((JInternalFrame)allFrames[i]).setMaximum(false);
    } catch (PropertyVetoException e) {
      e.printStackTrace();
    }
    
    allFrames[i].setBounds(x, 0, frameWidth, getBounds().height);
    x = x + frameWidth;
  }
  
  checkDesktopSize();
}

代码示例来源:origin: com.eas.platypus/platypus-js-forms

@ScriptFunction(jsDoc = MINIMIZE_JSDOC)
public void minimize() {
  if (surface != null) {
    if (surface instanceof JFrame) {
      ((JFrame) surface).setExtendedState(JFrame.ICONIFIED);
    } else if (surface instanceof JInternalFrame) {
      JInternalFrame aFrame = (JInternalFrame) surface;
      try {
        if (aFrame.isMaximum()) {
          aFrame.setMaximum(false);
        }
        if (!aFrame.isIcon() && aFrame.isIconifiable()) {
          aFrame.setIcon(true);
        }
      } catch (Exception e) {
      }
    }
  }
}

代码示例来源:origin: com.mgmtp.gcviewer/gcviewer

public void actionPerformed(final ActionEvent e) {
    final JInternalFrame[] frames = gcViewer.getDesktopPane().getAllFrames();
    final DesktopManager desktopManager = gcViewer.getDesktopPane().getDesktopManager();
    for (int i=0; i<frames.length; i++) {
      final JInternalFrame frame = frames[i];
      desktopManager.deiconifyFrame(frame);
      try {
        frame.setMaximum(false);
      } catch (PropertyVetoException e1) {
        e1.printStackTrace();
      }
      final int height = gcViewer.getDesktopPane().getHeight()/frames.length;
      desktopManager.setBoundsForFrame(frame, 0, height * i, gcViewer.getDesktopPane().getWidth(), height);
    }
  }
}

相关文章

JInternalFrame类方法