本文整理了Java中javax.swing.JDialog.getGlassPane()
方法的一些代码示例,展示了JDialog.getGlassPane()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。JDialog.getGlassPane()
方法的具体详情如下:
包路径:javax.swing.JDialog
类名称:JDialog
方法名:getGlassPane
暂无
代码示例来源:origin: stackoverflow.com
((JDialog) w).getGlassPane().setVisible(false);
代码示例来源:origin: sdedit/sdedit
public FontPreview (JDialog dialog, JTable table) {
this.glassPane = (JComponent) dialog.getGlassPane();
this.table = table;
table.addMouseMotionListener(this);
table.addMouseListener(this);
timer = new Timer(delay, this);
label = new JLabel();
label.setSize(140,60);
label.setOpaque(true);
label.setBackground(Color.YELLOW);
label.setBorder(BorderFactory.createLineBorder(Color.black, 1));
position = null;
timer.start();
}
代码示例来源:origin: com.github.insubstantial/substance
/**
* Recursively checks whether the specified component has visible glass
* pane.
*
* @param component
* Component to check.
* @return <code>true</code> if the specified component has visible glass
* pane, <code>false</code> otherwise.
*/
private static boolean hasGlassPane(Component component) {
if (component == null) {
return false;
}
// check if the component has visible glass pane
Component glassPane = null;
if (component instanceof JDialog) {
glassPane = ((JDialog) component).getGlassPane();
}
if (component instanceof JFrame) {
glassPane = ((JFrame) component).getGlassPane();
}
if ((glassPane != null) && (glassPane.isVisible())) {
return true;
}
return false;
}
代码示例来源:origin: org.java.net.substance/substance
/**
* Recursively checks whether the specified component has visible glass
* pane.
*
* @param component
* Component to check.
* @return <code>true</code> if the specified component has visible glass
* pane, <code>false</code> otherwise.
*/
private static boolean hasGlassPane(Component component) {
if (component == null) {
return false;
}
// check if the component has visible glass pane
Component glassPane = null;
if (component instanceof JDialog) {
glassPane = ((JDialog) component).getGlassPane();
}
if (component instanceof JFrame) {
glassPane = ((JFrame) component).getGlassPane();
}
if ((glassPane != null) && (glassPane.isVisible())) {
return true;
}
return false;
}
代码示例来源:origin: com.jidesoft/jide-oss
protected void endDragging() {
_isDragging = false;
if (_popupType == LIGHT_WEIGHT_POPUP) {
_currentPanel = null;
}
else if (_popupType == HEAVY_WEIGHT_POPUP) {
if (_currentWindow instanceof JWindow && ((JWindow) _currentWindow).getGlassPane() != null) {
((JWindow) _currentWindow).getGlassPane().setVisible(false);
((JWindow) _currentWindow).getGlassPane().setCursor(Cursor.getDefaultCursor());
}
else if (_currentWindow instanceof JDialog && ((JDialog) _currentWindow).getGlassPane() != null) {
((JDialog) _currentWindow).getGlassPane().setVisible(false);
((JDialog) _currentWindow).getGlassPane().setCursor(Cursor.getDefaultCursor());
}
_currentWindow = null;
}
_relativeX = 0;
_relativeY = 0;
}
代码示例来源:origin: org.jspresso.framework/jspresso-swing-application
private boolean doExecute(IAction action, Map<String, Object> context) {
JComponent sourceComponent = (JComponent) context.get(ActionContextConstants.SOURCE_COMPONENT);
Component windowOrInternalFrame = null;
if (sourceComponent != null) {
windowOrInternalFrame = SwingUtil.getWindowOrInternalFrame(sourceComponent);
}
if (windowOrInternalFrame instanceof JFrame) {
((JFrame) windowOrInternalFrame).getGlassPane().setVisible(true);
} else if (windowOrInternalFrame instanceof JInternalFrame) {
((JInternalFrame) windowOrInternalFrame).getGlassPane().setVisible(true);
} else if (windowOrInternalFrame instanceof JDialog) {
((JDialog) windowOrInternalFrame).getGlassPane().setVisible(true);
}
waitTimer.startTimer(sourceComponent);
try {
return super.execute(action, context);
} finally {
if (windowOrInternalFrame instanceof JFrame) {
((JFrame) windowOrInternalFrame).getGlassPane().setVisible(false);
} else if (windowOrInternalFrame instanceof JInternalFrame) {
((JInternalFrame) windowOrInternalFrame).getGlassPane().setVisible(false);
} else if (windowOrInternalFrame instanceof JDialog) {
((JDialog) windowOrInternalFrame).getGlassPane().setVisible(false);
}
waitTimer.stopTimer();
}
}
代码示例来源:origin: org.jspresso/jspresso-swing-application
((JInternalFrame) windowOrInternalFrame).getGlassPane().setVisible(true);
} else if (windowOrInternalFrame instanceof JDialog) {
((JDialog) windowOrInternalFrame).getGlassPane().setVisible(true);
false);
} else if (windowOrInternalFrame instanceof JDialog) {
((JDialog) windowOrInternalFrame).getGlassPane().setVisible(false);
代码示例来源:origin: org.bidib.jbidib.com.vldocking/vldocking
public void startDrag(DockableDragSource source) {
if(isDragStarted || source == null) {
// safety checks
return;
}
Window aboveWindow = this.window;
isDragStarted = true;
if(aboveWindow instanceof JFrame) {
oldGlassPane = ((JFrame) aboveWindow).getGlassPane();
oldGlassPaneVisible = oldGlassPane.isVisible();
((JFrame) aboveWindow).setGlassPane(dragGlassPane);
dragGlassPane.setVisible(true);
} else if(aboveWindow instanceof JDialog) {
oldGlassPane = ((JDialog) aboveWindow).getGlassPane();
oldGlassPaneVisible = oldGlassPane.isVisible();
((JDialog) aboveWindow).setGlassPane(dragGlassPane);
dragGlassPane.setVisible(true);
}
}
代码示例来源:origin: stackoverflow.com
pack();
JComponent glassPane = (JComponent) getGlassPane();
glassPane.setVisible(true);
代码示例来源:origin: com.jidesoft/jide-oss
((JWindow) _currentWindow).getGlassPane().setCursor(Cursor.getPredefinedCursor(Cursor.MOVE_CURSOR));
else if (_currentWindow instanceof JDialog && ((JDialog) _currentWindow).getGlassPane() != null) {
((JDialog) _currentWindow).getGlassPane().setVisible(true);
((JDialog) _currentWindow).getGlassPane().setCursor(Cursor.getPredefinedCursor(Cursor.MOVE_CURSOR));
代码示例来源:origin: stackoverflow.com
giraffewindow.setVisible(true);
giraffewindow.setDefaultCloseOperation(DISPOSE_ON_CLOSE);
JPanel glass = ((JPanel) giraffewindow.getGlassPane());
glass.setVisible(true);
status = new JLabel("I can change");
代码示例来源:origin: notzippy/JALOPY2-MAIN
glassPane = dialog.getGlassPane();
dialog.setGlassPane(pane);
pane.setVisible(true);
代码示例来源:origin: com.jidesoft/jide-oss
((JDialog) c).getGlassPane().setVisible(true);
((JDialog) c).getGlassPane().setCursor(s);
代码示例来源:origin: com.jidesoft/jide-oss
((JDialog) c).getGlassPane().setCursor(Cursor.getDefaultCursor());
((JDialog) c).getGlassPane().setVisible(false);
代码示例来源:origin: net.sf.cuf/cuf-swing
if ((dialog!=null) && (dialog.getGlassPane()!=mGlassPane))
代码示例来源:origin: org.bidib.jbidib.com.vldocking/vldocking
dragGlassPane.setVisible(true);
} else if(aboveWindow instanceof JDialog) {
oldGlassPane = ((JDialog) aboveWindow).getGlassPane();
oldGlassPaneVisible = oldGlassPane.isVisible();
((JDialog) aboveWindow).setGlassPane(dragGlassPane);
内容来源于网络,如有侵权,请联系作者删除!