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

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

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

JInternalFrame.setClosable介绍

暂无

代码示例

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

int height = (screenSize.height / 2) - (aboutH / 2) - 100;
jf.setBounds(width, height, aboutW, aboutH);
jf.setClosable(true);

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

window.setClosable(false);
return;
window.setClosable(true);
return;

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

jf.setClosable(true);
jf.setIconifiable(true);
jf.setMaximizable(true);

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

jf.setClosable(true);
jf.setIconifiable(true);
jf.setMaximizable(true);

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

schemaFrame.setClosable(true);
schemaFrame.setIconifiable(true);
schemaFrame.setMaximizable(true);

代码示例来源:origin: net.sourceforge.mydoggy/mydoggy-plaf

public void setCloseable(boolean closable) {
  if (this.closable == closable)
    return;
  boolean old = this.closable;
  this.closable = closable;
  internalFrame.setClosable(closable);
  firePropertyChangeEvent("closable", old, closable);
}

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

@ScriptFunction
public void setClosable(boolean aValue) {
  closable = aValue;
  if (surface instanceof JDialog) {
    //((JDialog) surface).setClosable(closable);
  }
  if (surface instanceof JInternalFrame) {
    ((JInternalFrame) surface).setClosable(closable);
  }
  if (surface instanceof JFrame) {
    //((JFrame) surface).setClosable(closable);
  }
}

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

/**
 * Updates the state of internal frames used in {@link JOptionPane}s.
 */
private void updateOptionPaneState() {
  Object obj = frame.getClientProperty("JInternalFrame.messageType");
  if (obj == null) {
    // Don't change the closable state unless in an JOptionPane.
    return;
  }
  if (frame.isClosable()) {
    frame.setClosable(false);
  }
}

代码示例来源:origin: org.java.net.substance/substance

/**
 * Updates the state of internal frames used in {@link JOptionPane}s.
 */
private void updateOptionPaneState() {
  Object obj = frame.getClientProperty("JInternalFrame.messageType");
  if (obj == null) {
    // Don't change the closable state unless in an JOptionPane.
    return;
  }
  if (frame.isClosable()) {
    frame.setClosable(false);
  }
}

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

public void active(FudaaReportFrameController _controller) {
 getFrame().setClosable(false);
 _controller.ifListener_.internalFrameAdded(getFrame(), this);
}

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

public void unactive(FudaaReportFrameController _controller) {
 getFrame().setClosable(true);
 _controller.ifListener_.internalFrameRemoved(getFrame(), this);
}

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

import javax.swing.JInternalFrame;

public class WeatherIFrame extends JInternalFrame {

  public WeatherIFrame() {
    this.setTitle("Weather");
    this.setSize(300, 200);
    this.setVisible(true);
    this.setClosable(true);
    this.setResizable(true);        
  }
}

代码示例来源:origin: BranislavLazic/SwingTutorials

public void run() {
    JDesktopPane desktopPane = new JDesktopPane();
    JInternalFrame intFrame = new JInternalFrame(
        "JInternalFrame demo");
    intFrame.setMaximizable(true);
    intFrame.setIconifiable(true);
    intFrame.setResizable(true);
    intFrame.setClosable(true);
    intFrame.setDefaultCloseOperation(JInternalFrame.DISPOSE_ON_CLOSE);
    intFrame.setSize(320, 240);
    // intFrame.pack();
    intFrame.setVisible(true);
    desktopPane.add(intFrame);
    JFrame frame = new JFrame();
    frame.add(desktopPane);
    frame.setDefaultCloseOperation(JFrame.DISPOSE_ON_CLOSE);
    frame.setSize(640, 480);
    // frame.pack();
    frame.setVisible(true);
  }
});

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

setTitle("JInternalFrame2");
setBounds(0, 0, 1366, 768);
setClosable(true);
getContentPane().setLayout(
    new MigLayout("", "[][][][][][]", "[][][][][][]"));

代码示例来源:origin: com.googlecode.gstreamer-java/gstreamer-java

JInternalFrame frame = new JInternalFrame(file.getName());
frame.setResizable(true);
frame.setClosable(true);
frame.setIconifiable(true);
frame.setMaximizable(true);

代码示例来源:origin: net.sf.nimrod/nimrod-laf

public void actionPerformed( ActionEvent ev) {
  JInternalFrame jif = new JInternalFrame( "The Long Titled Internal Frame, n� (this is to test \"strange caracters\" titles)" + pos / 5, true, true, true, true);
  
  jif.setVisible( true);
  jif.setFrameIcon( nextIcon());
  
  jif.setIconifiable( true);
  jif.setMaximizable( true);
  jif.setClosable( true);
  
  JButton but = new JButton( "Change Icon");
  but.addActionListener( new dummy( jif));
  jif.getContentPane().add( new JLabel( "Another InternalFrame"));
  jif.getContentPane().add( but, BorderLayout.SOUTH);
  
  jif.setLocation( new Point( pos, pos));
  
  pos += 5;
  jif.pack();
  desktop.add( jif);
  
  try {
   jif.setSelected( true);
  }
  catch ( PropertyVetoException e) {}
 }
}

代码示例来源:origin: net.sourceforge.mydoggy/mydoggy-plaf

protected void initInternalFrame() {
  internalFrame = new JInternalFrame(content.getTitle(), true, true, true, true);
  internalFrame.setFrameIcon(content.getIcon());
  internalFrame.getContentPane().add(content.getComponent());
  internalFrame.setClosable(closable);
  internalFrame.setMaximizable(true);
  initInternalFrameListeners();
}

代码示例来源:origin: org.jspresso.framework/jspresso-swing-application

/**
 * Creates a new JInternalFrame and populates it with a view.
 *
 * @param view
 *          the view to be set into the internal frame.
 * @return the constructed internal frame.
 */
private JInternalFrame createJInternalFrame(JComponent view, String title,
  Icon frameIcon) {
 JInternalFrame internalFrame = new JInternalFrame(title);
 internalFrame.setFrameIcon(frameIcon);
 internalFrame.setResizable(true);
 internalFrame.setClosable(true);
 internalFrame.setMaximizable(true);
 internalFrame.setIconifiable(true);
 internalFrame.getContentPane().add(view, BorderLayout.CENTER);
 internalFrame.setDefaultCloseOperation(WindowConstants.HIDE_ON_CLOSE);
 internalFrame.setGlassPane(createHermeticGlassPane());
 return internalFrame;
}

代码示例来源:origin: org.jspresso/jspresso-swing-application

/**
 * Creates a new JInternalFrame and populates it with a view.
 * 
 * @param view
 *            the view to be set into the internal frame.
 * @return the constructed internal frame.
 */
private JInternalFrame createJInternalFrame(IView<JComponent> view) {
 JInternalFrame internalFrame = new JInternalFrame(view.getDescriptor()
   .getI18nName(getTranslationProvider(), getLocale()));
 internalFrame.setFrameIcon(getIconFactory().getIcon(
   view.getDescriptor().getIconImageURL(), IIconFactory.SMALL_ICON_SIZE));
 internalFrame.setResizable(true);
 internalFrame.setClosable(false);
 internalFrame.setMaximizable(true);
 internalFrame.setIconifiable(true);
 internalFrame.getContentPane().add(view.getPeer(), BorderLayout.CENTER);
 internalFrame.setDefaultCloseOperation(WindowConstants.HIDE_ON_CLOSE);
 internalFrame.setGlassPane(createHermeticGlassPane());
 return internalFrame;
}

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

q.add(internalFrame1);
internalFrame1.setClosable(true);

相关文章

JInternalFrame类方法