本文整理了Java中javax.swing.text.JTextComponent.getRootPane()
方法的一些代码示例,展示了JTextComponent.getRootPane()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。JTextComponent.getRootPane()
方法的具体详情如下:
包路径:javax.swing.text.JTextComponent
类名称:JTextComponent
方法名:getRootPane
暂无
代码示例来源:origin: net.sf.squirrel-sql.thirdparty-non-maven/org-netbeans-modules-editor-lib
/** Install popup panel to current textComponent root pane */
private void installToRootPane(JComponent c) {
JRootPane rp = textComponent.getRootPane();
if (rp != null) {
rp.getLayeredPane().add(c, JLayeredPane.POPUP_LAYER, 0);
}
}
代码示例来源:origin: net.java.abeille/abeille
private void installToRootPane(JTextComponent component) {
JRootPane rp = component.getRootPane();
if (rp != null) {
rp.getLayeredPane().add(this, JLayeredPane.POPUP_LAYER, 0);
}
}
代码示例来源:origin: de.sciss/jsyntaxpane
/**
* Creates new form GotoLineDialog
* @param text
*/
private GotoLineDialog(JTextComponent text) {
super(SwingUtilities.getWindowAncestor(text), ModalityType.APPLICATION_MODAL);
initComponents();
this.text = new WeakReference<JTextComponent>(text);
setLocationRelativeTo(text.getRootPane());
getRootPane().setDefaultButton(jBtnOk);
text.getDocument().putProperty(PROPERTY_KEY, this);
SwingUtils.addEscapeListener(this);
}
代码示例来源:origin: de.sciss/syntaxpane
/**
* Creates new form GotoLineDialog
* @param text
*/
private GotoLineDialog(JTextComponent text) {
super(SwingUtilities.getWindowAncestor(text), ModalityType.APPLICATION_MODAL);
initComponents();
this.text = new WeakReference<JTextComponent>(text);
setLocationRelativeTo(text.getRootPane());
getRootPane().setDefaultButton(jBtnOk);
text.getDocument().putProperty(PROPERTY_KEY, this);
SwingUtils.addEscapeListener(this);
}
代码示例来源:origin: de.sciss/syntaxpane
/**
* Creates new form FindDialog
* @param text
* @param dsd DocumentSerachData
*/
public ReplaceDialog(JTextComponent text,
DocumentSearchData dsd) {
super(SwingUtilities.getWindowAncestor(text), ModalityType.MODELESS.MODELESS);
initComponents();
textComponent = text;
this.dsd = dsd;
textComponent.addCaretListener(this);
setLocationRelativeTo(text.getRootPane());
getRootPane().setDefaultButton(jBtnNext);
SwingUtils.addEscapeListener(this);
jBtnReplaceAll.setEnabled(text.isEditable() && text.isEnabled());
}
代码示例来源:origin: net.java.abeille/abeille
private void checkRootPane() {
JTextComponent component = extEditorUI.getComponent();
if (component != null) {
if (component.getRootPane() != getRootPane()) {
removeFromRootPane();
installToRootPane(component);
}
}
}
代码示例来源:origin: de.sciss/jsyntaxpane
/**
* Creates new form FindDialog
* @param text
* @param dsd DocumentSerachData
*/
public ReplaceDialog(JTextComponent text,
DocumentSearchData dsd) {
super(SwingUtilities.getWindowAncestor(text), ModalityType.MODELESS.MODELESS);
initComponents();
textComponent = text;
this.dsd = dsd;
textComponent.addCaretListener(this);
setLocationRelativeTo(text.getRootPane());
getRootPane().setDefaultButton(jBtnNext);
SwingUtils.addEscapeListener(this);
jBtnReplaceAll.setEnabled(text.isEditable() && text.isEnabled());
}
代码示例来源:origin: net.java.abeille/abeille
correction.y = (component.getParent().getLocationOnScreen().y - component.getRootPane().getLocationOnScreen().y) - 1;
correction.x = (component.getParent().getLocationOnScreen().x - component.getRootPane().getLocationOnScreen().x) - 1;
代码示例来源:origin: net.java.abeille/abeille
private void checkAddToPane() {
if (toolTip != null) {
JTextComponent component = extEditorUI.getComponent();
if (component != null) {
JRootPane rp = component.getRootPane();
// Possibly deinstall the old component from layered pane
JRootPane ttrp = toolTip.getRootPane();
if (ttrp != rp) {
if (ttrp != null) {
ttrp.getLayeredPane().remove(toolTip);
}
rp.getLayeredPane().add(toolTip, JLayeredPane.POPUP_LAYER, 0);
}
}
}
}
代码示例来源:origin: net.sf.squirrel-sql.thirdparty-non-maven/org-netbeans-modules-editor-lib
JRootPane rp = textComponent.getRootPane();
if (rp!=null){
bounds = SwingUtilities.convertRectangle(textComponent, bounds,
内容来源于网络,如有侵权,请联系作者删除!