javax.swing.JFrame.isResizable()方法的使用及代码示例

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

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

JFrame.isResizable介绍

暂无

代码示例

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

/**
 * Gets the Iconifiable attribute of the SkinWindowWindow object
 * 
 * @return The Iconifiable value
 */
public boolean isIconifiable() {
 boolean toreturn = false;
 if (frame != null) toreturn = frame.isResizable();
 return toreturn;
}

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

/**
 * Is the parent window iconifiable?
 *
 * @return {@code true} if the parent window is iconifiable, {@code false}
 *         otheriwes.
 */
private boolean isParentIconifiable() {
  if (rootParent instanceof JFrame) {
    return ((JFrame)rootParent).isResizable();
  }
  return false;
}

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

/**
 * Is the parent window maximizable?
 *
 * @return {@code true} if the parent window is maximizable, {@code false}
 *         otheriwes.
 */
private boolean isParentMaximizable() {
  if (rootParent instanceof JFrame) {
    return ((JFrame)rootParent).isResizable();
  }
  return false;
}

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

/**
 * Gets the Maximizable attribute of the SkinWindowWindow object
 * 
 * @return The Maximizable value
 */
public boolean isMaximizable() {
 boolean toreturn = false;
 if (frame != null) toreturn = frame.isResizable() && !isShaded();
 return toreturn;
}

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

/**
 * Gets the Resizable attribute of the SkinWindowWindow object
 * 
 * @return The Resizable value
 */
public boolean isResizable() {
 boolean toreturn = false;
 if (frame != null) {
  toreturn = frame.isResizable();
 } else if (dialog != null) { return dialog.isResizable() && !isShaded(); }
 return toreturn;
}

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

public boolean isResizable(Component c) {
  boolean resizable = true;
  if (c instanceof JDialog) {
    JDialog dialog = (JDialog) c;
    resizable = dialog.isResizable();
  } else if (c instanceof JInternalFrame) {
    JInternalFrame frame = (JInternalFrame) c;
    resizable = frame.isResizable();
  } else if (c instanceof JRootPane) {
    JRootPane jp = (JRootPane) c;
    if (jp.getParent() instanceof JFrame) {
      JFrame frame = (JFrame) c.getParent();
      resizable = frame.isResizable();
    } else if (jp.getParent() instanceof JDialog) {
      JDialog dialog = (JDialog) c.getParent();
      resizable = dialog.isResizable();
    }
  }
  return resizable;
}

代码示例来源:origin: com.github.tntim96/rhino

if (!frame.isResizable()) {
  frame.setResizable(true);
  frame.setDefaultCloseOperation(WindowConstants.DO_NOTHING_ON_CLOSE);

代码示例来源:origin: com.github.houbie/rhino-mod

if (!frame.isResizable()) {
  frame.setResizable(true);
  frame.setDefaultCloseOperation(WindowConstants.DO_NOTHING_ON_CLOSE);

代码示例来源:origin: org.jvnet.hudson/embedded-rhino-debugger

if (!frame.isResizable()) {
  frame.setResizable(true);
  frame.setDefaultCloseOperation(WindowConstants.DO_NOTHING_ON_CLOSE);

代码示例来源:origin: ro.isdc.wro4j/rhino

if (!frame.isResizable()) {
  frame.setResizable(true);
  frame.setDefaultCloseOperation(WindowConstants.DO_NOTHING_ON_CLOSE);

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

@Override
public void saveProperties() {
  if(mapViewWindows == null)
    return;
  saveSplitPanePosition();
  if (frame.isResizable()) {
    final int winState = frame.getExtendedState() & ~Frame.ICONIFIED;
    if (JFrame.MAXIMIZED_BOTH != (winState & JFrame.MAXIMIZED_BOTH)) {
      resourceController.setProperty("appwindow_x", String.valueOf(frame.getX()));
      resourceController.setProperty("appwindow_y", String.valueOf(frame.getY()));
      resourceController.setProperty("appwindow_width", String.valueOf(frame.getWidth()));
      resourceController.setProperty("appwindow_height", String.valueOf(frame.getHeight()));
    }
    resourceController.setProperty("appwindow_state", String.valueOf(winState));
  }
  mapViewWindows.saveLayout();
  resourceController.getLastOpenedList().saveProperties();
}

代码示例来源:origin: com.github.insubstantial/substance-swingx

@Override
protected void paintBackground(Graphics2D g, JXStatusBar bar) {
  this.bgDelegate.paint(bar, g, true);
  JRootPane rootPane = SwingUtilities.getRootPane(bar);
  Window window = SwingUtilities.getWindowAncestor(bar);
  boolean isResizable = false;
  if (window instanceof JFrame) {
    JFrame frame = (JFrame) window;
    isResizable = frame.isResizable()
        && (frame.getExtendedState() != JFrame.MAXIMIZED_BOTH);
  }
  if (window instanceof JDialog) {
    isResizable = ((JDialog) window).isResizable();
  }
  boolean hasResizeGrip = SubstanceCoreUtilities
      .toShowExtraWidgets(rootPane)
      && isResizable;
  if (hasResizeGrip) {
    int dim = bar.getHeight() * 2 / 3;
    SubstanceColorScheme scheme = SubstanceColorSchemeUtilities
        .getColorScheme(bar, ColorSchemeAssociationKind.SEPARATOR,
            ComponentState.ENABLED);
    BufferedImage resizeImage = SubstanceImageCreator
        .getResizeGripImage(bar, scheme, dim, false);
    g.drawImage(resizeImage, bar.getWidth() - dim, bar.getHeight()
        - dim, null);
  }
}

相关文章

JFrame类方法