本文整理了Java中javax.swing.JTree.getRootPane()
方法的一些代码示例,展示了JTree.getRootPane()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。JTree.getRootPane()
方法的具体详情如下:
包路径:javax.swing.JTree
类名称:JTree
方法名:getRootPane
暂无
代码示例来源:origin: net.sf.squirrel-sql.thirdparty-non-maven/openide
/** Sets the original glass pane to the root pane of stored container.
*/
static void putBackOriginal () {
if (oldPane == null)
// pending, should throw an exception
return ;
originalSource.getRootPane ().setGlassPane (oldPane);
oldPane.setVisible (wasVisible);
oldPane = null;
}
代码示例来源:origin: net.sf.squirrel-sql.thirdpary-non-maven/openide
/** Sets the original glass pane to the root pane of stored container.
*/
static void putBackOriginal () {
if (oldPane == null)
// pending, should throw an exception
return ;
originalSource.getRootPane ().setGlassPane (oldPane);
oldPane.setVisible (wasVisible);
oldPane = null;
}
代码示例来源:origin: fr.avianey.apache-xmlgraphics/batik
/**
* Sets the original glass pane.
*
* @param dte
* DropTargetEvent to get the tree
*/
private void setOriginalGlassPane(JTree tree) {
JRootPane rootPane = tree.getRootPane();
rootPane.setGlassPane(originalGlassPane);
originalGlassPane.setVisible(false);
rootPane.repaint();
}
代码示例来源:origin: apache/batik
/**
* Sets the original glass pane.
*
* @param dte
* DropTargetEvent to get the tree
*/
private void setOriginalGlassPane(JTree tree) {
JRootPane rootPane = tree.getRootPane();
rootPane.setGlassPane(originalGlassPane);
originalGlassPane.setVisible(false);
rootPane.repaint();
}
代码示例来源:origin: org.biomoby/taverna-biomoby
private void resetGlassPane() {
if (oldGlassPane != null) {
c.setVisible(false);
tree.getRootPane().setGlassPane(oldGlassPane);
oldGlassPane = null;
}
}
代码示例来源:origin: info.aduna.commons/aduna-commons-swing
private JRootPane getRootPane() {
Window window = SwingUtilities.windowForComponent(tree);
if (window instanceof RootPaneContainer) {
return ((RootPaneContainer) window).getRootPane();
}
else {
// try as a last resort
return tree.getRootPane();
}
}
代码示例来源:origin: net.sf.squirrel-sql.thirdparty-non-maven/openide
private void checkStoredGlassPane () {
// remember current glass pane to set back at end of dragging over this compoment
if (!DropGlassPane.isOriginalPaneStored ()) {
Component comp = tree.getRootPane ().getGlassPane ();
DropGlassPane.setOriginalPane (tree, comp, comp.isVisible ());
// set glass pane for paint selection line
dropPane = DropGlassPane.getDefault (tree);
tree.getRootPane ().setGlassPane (dropPane);
dropPane.revalidate();
dropPane.setVisible (true);
}
}
代码示例来源:origin: net.sf.squirrel-sql.thirdpary-non-maven/openide
private void checkStoredGlassPane () {
// remember current glass pane to set back at end of dragging over this compoment
if (!DropGlassPane.isOriginalPaneStored ()) {
Component comp = tree.getRootPane ().getGlassPane ();
DropGlassPane.setOriginalPane (tree, comp, comp.isVisible ());
// set glass pane for paint selection line
dropPane = DropGlassPane.getDefault (tree);
tree.getRootPane ().setGlassPane (dropPane);
dropPane.revalidate();
dropPane.setVisible (true);
}
}
代码示例来源:origin: org.netbeans.api/org-openide-explorer
private void checkStoredGlassPane() {
// remember current glass pane to set back at end of dragging over this compoment
if (!DropGlassPane.isOriginalPaneStored()) {
Component comp = tree.getRootPane().getGlassPane();
DropGlassPane.setOriginalPane(tree, comp, comp.isVisible());
// set glass pane for paint selection line
dropPane = DropGlassPane.getDefault(tree);
tree.getRootPane().setGlassPane(dropPane);
dropPane.revalidate();
dropPane.setVisible(true);
}
}
代码示例来源:origin: org.biomoby/taverna-biomoby
public void mouseMoved(MouseEvent me) {
path = tree.getPathForLocation(me.getX(), me.getY());
if (path == null) {
resetGlassPane();
return;
}
row = tree.getRowForPath(path);
bounds = tree.getPathBounds(path);
if (!tree.getVisibleRect().contains(bounds)) {
if (oldGlassPane == null) {
oldGlassPane = tree.getRootPane().getGlassPane();
c.setOpaque(false);
tree.getRootPane().setGlassPane(c);
c.setVisible(true);
} else
tree.getRootPane().repaint();
} else {
resetGlassPane();
}
}
}
代码示例来源:origin: net.sf.squirrel-sql.thirdparty-non-maven/openide
/** Converts line's bounds by the bounds of the root pane. Drop glass pane
* is over this root pane. After covert a given line is set to drop glass pane.
* @param line line for show in drop glass pane */
private void convertBoundsAndSetDropLine (final Line2D line) {
int x1 = (int)line.getX1 (), x2 = (int)line.getX2 ();
int y1 = (int)line.getY1 (), y2 = (int)line.getY2 ();
Point p1 = SwingUtilities.convertPoint (tree, x1, y1, tree.getRootPane ());
Point p2 = SwingUtilities.convertPoint (tree, x2, y2, tree.getRootPane ());
line.setLine (p1, p2);
dropPane.setDropLine (line);
}
代码示例来源:origin: net.sf.squirrel-sql.thirdpary-non-maven/openide
/** Converts line's bounds by the bounds of the root pane. Drop glass pane
* is over this root pane. After covert a given line is set to drop glass pane.
* @param line line for show in drop glass pane */
private void convertBoundsAndSetDropLine (final Line2D line) {
int x1 = (int)line.getX1 (), x2 = (int)line.getX2 ();
int y1 = (int)line.getY1 (), y2 = (int)line.getY2 ();
Point p1 = SwingUtilities.convertPoint (tree, x1, y1, tree.getRootPane ());
Point p2 = SwingUtilities.convertPoint (tree, x2, y2, tree.getRootPane ());
line.setLine (p1, p2);
dropPane.setDropLine (line);
}
代码示例来源:origin: org.netbeans.api/org-openide-explorer
/** Converts line's bounds by the bounds of the root pane. Drop glass pane
* is over this root pane. After covert a given line is set to drop glass pane.
* @param line line for show in drop glass pane */
private void convertBoundsAndSetDropLine(final Line2D line) {
int x1 = (int) line.getX1();
int x2 = (int) line.getX2();
int y1 = (int) line.getY1();
int y2 = (int) line.getY2();
Point p1 = SwingUtilities.convertPoint(tree, x1, y1, tree.getRootPane());
Point p2 = SwingUtilities.convertPoint(tree, x2, y2, tree.getRootPane());
line.setLine(p1, p2);
dropPane.setDropLine(line);
}
代码示例来源:origin: fr.avianey.apache-xmlgraphics/batik
public void dragEnter(DropTargetDragEvent dtde) {
JTree tree = (JTree) dtde.getDropTargetContext().getComponent();
JRootPane rootPane = tree.getRootPane();
代码示例来源:origin: apache/batik
public void dragEnter(DropTargetDragEvent dtde) {
JTree tree = (JTree) dtde.getDropTargetContext().getComponent();
JRootPane rootPane = tree.getRootPane();
内容来源于网络,如有侵权,请联系作者删除!