本文整理了Java中javax.swing.JInternalFrame.isClosable()
方法的一些代码示例,展示了JInternalFrame.isClosable()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。JInternalFrame.isClosable()
方法的具体详情如下:
包路径:javax.swing.JInternalFrame
类名称:JInternalFrame
方法名:isClosable
暂无
代码示例来源:origin: net.sf.squirrel-sql.thirdparty-non-maven/skinlf
/**
* Gets the Closable attribute of the InternalFrameWindow object
*
* @return The Closable value
*/
public boolean isClosable() {
return frame.isClosable();
}
代码示例来源:origin: khuxtable/seaglass
/**
* @see java.awt.event.ActionListener#actionPerformed(java.awt.event.ActionEvent)
*/
public void actionPerformed(ActionEvent e) {
if (frame.isClosable()) {
frame.doDefaultCloseAction();
}
}
}
代码示例来源: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: com.jtattoo/JTattoo
public Dimension minimumLayoutSize(Container c) {
int width = 30;
if (frame.isClosable()) {
width += 21;
width += 16 + (frame.isClosable() ? 10 : 4);
width += 16 + (frame.isMaximizable() ? 2 : (frame.isClosable() ? 10 : 4));
代码示例来源:origin: com.jtattoo/JTattoo
public Dimension minimumLayoutSize(Container c) {
int width = 30;
if (frame.isClosable()) {
width += 21;
width += 16 + (frame.isClosable() ? 10 : 4);
width += 16 + (frame.isMaximizable() ? 2 : (frame.isClosable() ? 10 : 4));
代码示例来源:origin: com.jtattoo/JTattoo
public Dimension minimumLayoutSize(Container c) {
int width = 30;
if (frame.isClosable()) {
width += 21;
width += 16 + (frame.isClosable() ? 10 : 4);
width += 16 + (frame.isMaximizable() ? 2 : (frame.isClosable() ? 10 : 4));
代码示例来源: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: joel-costigliola/assertj-swing
@RunsInEDT
@Nullable private static Point findCloseButtonLocation(final @Nonnull JInternalFrame internalFrame) {
return execute(() -> {
checkShowing(internalFrame);
if (!internalFrame.isClosable()) {
String msg = String.format("The JInternalFrame <%s> is not closable", format(internalFrame));
throw new IllegalStateException(msg);
}
if (internalFrame.isClosed()) {
return null;
}
return closeButtonLocation(internalFrame);
});
}
代码示例来源:origin: net.sf.tinylaf/tinylaf
if(frame.isClosable()) {
spacing = 2;
x += leftToRight ? -spacing - buttonWidth : spacing;
代码示例来源:origin: org.fudaa.framework.ctulu/ctulu-bu
public void close() {
if (isCloseFrameMode()) {
JInternalFrame frame = getCurrentInternalFrame();
if (!frame.isClosed() && frame.isClosable()) {
try {
frame.setClosed(true);
} catch (PropertyVetoException ex) {}
}
}
}
代码示例来源:origin: net.sourceforge.ondex.apps/ovtk2
if (frame instanceof JInternalFrame && (group == null || frame.getGroup().equals(group))) {
JInternalFrame internalF = ((JInternalFrame) frame);
if (internalF.isClosable()) {
closableFrames.add(internalF);
代码示例来源:origin: com.jtattoo/JTattoo
int y = Math.max(0, ((h - buttonHeight) / 2) - 1);
if (frame.isClosable()) {
x += leftToRight ? -buttonWidth : spacing;
closeButton.setBounds(x, y, buttonWidth, buttonHeight);
代码示例来源:origin: net.sf.squirrel-sql.plugins/graph
else if (frame.isMaximizable())
r = maxButton.getBounds();
else if (frame.isClosable()) r = closeButton.getBounds();
int titleW;
代码示例来源:origin: abbot/abbot
/** Close the internal frame. */
public void actionClose(Component comp) {
// This is LAF-specific, so it must be done programmatically.
final JInternalFrame frame = (JInternalFrame)comp;
if (!frame.isClosable())
throw new ActionFailedException("The given JInternalFrame ("
+ toString(frame) + ") is not "
+ "closable");
Point p = getCloseLocation(frame);
mouseMove(frame, p.x, p.y);
/*
final InternalFrameEvent ife =
new InternalFrameEvent(frame, InternalFrameEvent.
INTERNAL_FRAME_CLOSING);
*/
// cf. BasicInternalFrameTitlePane#postClosingEvent handling of
// close
// Seems to be a bug in the handling of internal frame events; they're
// not normally posted to the AWT event queue.
invokeAndWait(new Runnable() {
public void run() {
frame.doDefaultCloseAction();
}
});
}
}
代码示例来源:origin: com.jtattoo/JTattoo
int y = 0;
if (frame.isClosable()) {
closeButton.setBounds(x, y, btnWidth, btnHeight);
x += btnWidth + spacing;
代码示例来源:origin: com.jtattoo/JTattoo
int y = centerButtons() ? Math.max(0, ((h - btnHeight) / 2)) : 0;
if (frame.isClosable()) {
closeButton.setBounds(x, y, btnWidth, btnHeight);
x += spacing + btnWidth;
代码示例来源:origin: com.jtattoo/JTattoo
int y = 0;
if (frame.isClosable()) {
closeButton.setBounds(x, y, btnWidth, btnHeight);
x += btnWidth + spacing;
代码示例来源:origin: khuxtable/seaglass
int x = getWidth() - insets.right - 4;
if (frame.isClosable()) {
x = center(closeButton, insets, x, true);
int x = insets.left + 4;
if (frame.isClosable()) {
x = center(closeButton, insets, x, false);
代码示例来源:origin: org.fudaa.framework.ctulu/ctulu-bu
protected void menusOrganisationFenetres() {
if (!hasDesktop()) return;
BuDesktop desktop = getMainPanel().getDesktop();
boolean appli = (getApp() instanceof JFrame);
JInternalFrame frame = desktop.getCurrentInternalFrame();
boolean b;
b = (desktop.getNormalFramesCount() > 0);
setEnabledForAction("CASCADE", b);
setEnabledForAction("MOSAIQUE", b);
b = (desktop.getIconifiedFramesCount() > 0);
setEnabledForAction("RANGERICONES", b);
b = (desktop.getPalettesCount() > 0);
setEnabledForAction("RANGERPALETTES", b);
b = (frame != null);
setEnabledForAction("PLEINECRAN", b && appli);
if (isCloseFrameMode()) {
b = (frame != null) && frame.isClosable();
setEnabledForAction("FERMER", b);
}
// TMP
// desktop.adjustSize();
}
}
内容来源于网络,如有侵权,请联系作者删除!