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

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

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

JInternalFrame.isIconifiable介绍

暂无

代码示例

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

/**
 * Gets the Iconifiable attribute of the InternalFrameWindow
 * object
 * 
 * @return The Iconifiable value
 */
public boolean isIconifiable() {
 return frame.isIconifiable();
}

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

@Override
 @Nullable protected Pair<Boolean, Point> executeInEDT() throws Throwable {
  checkShowingOrIconified(internalFrame);
  if (!internalFrame.isIconifiable()) {
   String msg = String.format("The JInternalFrame <%s> is not iconifiable.", format(internalFrame));
   throw new IllegalStateException(msg);
  }
  return iconifyInfo(internalFrame);
 }
});

代码示例来源:origin: khuxtable/seaglass

public void actionPerformed(ActionEvent evt) {
  if (evt.getSource() instanceof JToggleButton) {
    // Either iconify the frame or deiconify and activate it.
    JToggleButton button = (JToggleButton) evt.getSource();
    try {
      boolean selected = button.isSelected();
      if (!selected && !frame.isIconifiable()) {
        button.setSelected(true);
      } else {
        frame.setIcon(!selected);
        if (selected) {
          frame.setSelected(true);
        }
      }
    } catch (PropertyVetoException e2) {
    }
  }
}

代码示例来源:origin: khuxtable/seaglass

/**
 * Set the enable/disabled state for the buttons.
 */
private void enableActions() {
  restoreAction.setEnabled(frame.isMaximum() || frame.isIcon());
  maximizeAction.setEnabled((frame.isMaximizable() && !frame.isMaximum() && !frame.isIcon())
                 || (frame.isMaximizable() && frame.isIcon()));
  iconifyAction.setEnabled(frame.isIconifiable() && !frame.isIcon());
  closeAction.setEnabled(frame.isClosable());
  sizeAction.setEnabled(false);
  moveAction.setEnabled(false);
}

代码示例来源:origin: khuxtable/seaglass

/**
   * @see java.awt.event.ActionListener#actionPerformed(java.awt.event.ActionEvent)
   */
  public void actionPerformed(ActionEvent e) {
    if (frame.isIconifiable()) {
      if (!frame.isIcon()) {
        try {
          frame.setIcon(true);
        } catch (PropertyVetoException e1) {
        }
      } else {
        try {
          frame.setIcon(false);
        } catch (PropertyVetoException e1) {
        }
      }
    }
  }
}

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

@ScriptFunction(jsDoc = MINIMIZE_ALL_JSDOC)
public void minimizeAll() throws PropertyVetoException {
  for (JInternalFrame f : getAllFrames()) {
    if (f.isIconifiable() && !f.isIcon()) {
      f.setIcon(true);
    }
  }
}

代码示例来源:origin: net.sourceforge.ondex.apps/ovtk2

@Override
public void actionPerformed(ActionEvent e) {
  List<RegisteredFrame> frames = frameRegistry.getInternalFrames();
  for (RegisteredFrame frame : frames) {
    if (frame instanceof JInternalFrame && (group == null || frame.getGroup().equals(group))) {
      JInternalFrame internalF = ((JInternalFrame) frame);
      if (internalF.isIconifiable() && !internalF.isIcon()) {
        try {
          internalF.setIcon(true);
        } catch (PropertyVetoException e1) {
          e1.printStackTrace();
        }
      }
    }
  }
}

代码示例来源:origin: com.jtattoo/JTattoo

public void setPalette(boolean b) {
  isPalette = b;
  if (isPalette) {
    closeButton.setIcon(paletteCloseIcon);
    if (frame.isMaximizable()) {
      remove(maxButton);
    }
    if (frame.isIconifiable()) {
      remove(iconButton);
    }
  } else {
    closeButton.setIcon(closeIcon);
    if (frame.isMaximizable()) {
      add(maxButton);
    }
    if (frame.isIconifiable()) {
      add(iconButton);
    }
  }
  revalidate();
  repaint();
}

代码示例来源:origin: net.sourceforge.ondex.apps/ovtk2

@Override
  public void actionPerformed(ActionEvent e) {
    List<RegisteredFrame> frames = frameRegistry.getInternalFrames();
    for (RegisteredFrame frame : frames) {
      if (frame instanceof JInternalFrame && (group == null || frame.getGroup().equals(group))) {
        JInternalFrame internalF = ((JInternalFrame) frame);
        if (internalF.isIconifiable() && internalF.isIcon()) {
          try {
            internalF.setIcon(false);
          } catch (PropertyVetoException e1) {
            e1.printStackTrace();
          }
        }
      }
    }
  }
}

代码示例来源:origin: com.jtattoo/JTattoo

width += 16 + (frame.isClosable() ? 10 : 4);
if (frame.isIconifiable()) {
  width += 16 + (frame.isMaximizable() ? 2 : (frame.isClosable() ? 10 : 4));

代码示例来源:origin: com.jtattoo/JTattoo

width += 16 + (frame.isClosable() ? 10 : 4);
if (frame.isIconifiable()) {
  width += 16 + (frame.isMaximizable() ? 2 : (frame.isClosable() ? 10 : 4));

代码示例来源:origin: com.jtattoo/JTattoo

width += 16 + (frame.isClosable() ? 10 : 4);
if (frame.isIconifiable()) {
  width += 16 + (frame.isMaximizable() ? 2 : (frame.isClosable() ? 10 : 4));

代码示例来源:origin: net.sf.squirrel-sql.plugins/graph

if (frame.isIconifiable())
  r = iconButton.getBounds();
else if (frame.isMaximizable())

代码示例来源: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.jtattoo/JTattoo

x += btnWidth + spacing;
if (frame.isIconifiable() && !isPalette) {
  iconButton.setBounds(x, y, btnWidth, btnHeight);
  x += btnWidth + spacing;

代码示例来源:origin: com.jtattoo/JTattoo

x += spacing + btnWidth;
if (frame.isIconifiable() && !isPalette) {
  iconButton.setBounds(x, y, btnWidth, btnHeight);
  x += spacing + btnWidth;

代码示例来源:origin: com.jtattoo/JTattoo

x += btnWidth + spacing;
if (frame.isIconifiable() && !isPalette) {
  iconButton.setBounds(x, y, btnWidth, btnHeight);
  x += btnWidth + spacing;

代码示例来源:origin: khuxtable/seaglass

if (frame.isIconifiable()) {
  x = center(iconButton, insets, x, true);
if (frame.isIconifiable()) {
  x = center(iconButton, insets, x, false);

代码示例来源:origin: khuxtable/seaglass

/**
   * @see java.awt.event.ActionListener#actionPerformed(java.awt.event.ActionEvent)
   */
  public void actionPerformed(ActionEvent evt) {
    if (frame.isMaximizable() && frame.isMaximum() && frame.isIcon()) {
      try {
        frame.setIcon(false);
      } catch (PropertyVetoException e) {
      }
    } else if (frame.isMaximizable() && frame.isMaximum()) {
      try {
        frame.setMaximum(false);
      } catch (PropertyVetoException e) {
      }
    } else if (frame.isIconifiable() && frame.isIcon()) {
      try {
        frame.setIcon(false);
      } catch (PropertyVetoException e) {
      }
    }
  }
}

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

if (!frame.isIconifiable())
  throw new ActionFailedException("The given JInternalFrame ("
                  + toString(frame) + ") is not "

相关文章

JInternalFrame类方法