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

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

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

JInternalFrame.isResizable介绍

暂无

代码示例

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

/**
 * Gets the Resizable attribute of the InternalFrameWindow object
 * 
 * @return The Resizable value
 */
public boolean isResizable() {
 return isShaded() == false && frame.isResizable();
}

代码示例来源:origin: org.fudaa.framework.ctulu/ctulu-bu

public boolean isVisible()
{
 JInternalFrame f=getTop();
 return (f!=null)&&f.isResizable();
}

代码示例来源:origin: de.sciss/scisslib

public boolean isResizable()
{
  if( f != null ) {
    return f.isResizable();
  } else if( d != null ) {
    return d.isResizable();
  } else if( jif != null ) {
    return jif.isResizable();
  } else {
    throw new IllegalStateException();
  }
}

代码示例来源: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: org.fudaa.framework.ctulu/ctulu-bu

public final void snapWH(JComponent _f) {
 if (BuPreferences.BU.getBooleanProperty("desktop.snap", false) && !isTabbed() && !isPalette(_f)
   && (_f instanceof JInternalFrame)) {
  Dimension d = _f.getSize();
  boolean b = false;
  if (((JInternalFrame) _f).isResizable()) {
   if (d.width % SNAPX != 0) {
    d.width = d.width + SNAPX - d.width % SNAPX;
    b = true;
   }
   if (d.height % SNAPY != 0) {
    d.height = d.height + SNAPY - d.height % SNAPY;
    b = true;
   }
  }
  if (b) _f.setSize(d);
 }
}

代码示例来源:origin: org.fudaa.framework.ctulu/ctulu-bu

public void checkInternalFrame(JInternalFrame _f) {
 if (!SwingUtilities.isEventDispatchThread()) throw new RuntimeException("Not in swing thread.");
 Dimension dd = getSize();
 Point pf = _f.getLocation();
 Dimension df = _f.getSize();
 if (_f.isResizable()) {
  if (df.width > dd.width) df.width = dd.width;
  if (df.height > dd.height) df.height = dd.height;
  if (!df.equals(getSize())) _f.setSize(df);
 }
 if (pf.x + df.width > dd.width) pf.x = dd.width - df.width;
 if (pf.y + df.height > dd.height) pf.y = dd.height - df.height;
 if (pf.x < 0) pf.x = 0;
 if (pf.y < 0) pf.y = 0;
 if (isTabbed() && isPalette(_f) && (pf.x < LEFT_MARGIN + 4)) pf.x = LEFT_MARGIN + 4;
 if (!pf.equals(getLocation())) _f.setLocation(pf);
 adjustSize();
}

相关文章

JInternalFrame类方法