本文整理了Java中javax.swing.JDesktopPane.getParent()
方法的一些代码示例,展示了JDesktopPane.getParent()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。JDesktopPane.getParent()
方法的具体详情如下:
包路径:javax.swing.JDesktopPane
类名称:JDesktopPane
方法名:getParent
暂无
代码示例来源:origin: pentaho/mondrian
protected boolean editMode(EventObject evt) {
// toggle edit mode between xml or properties table form
editModeXML = !isEditModeXML();
editModeButton.setSelected(isEditModeXML());
if (isEditModeXML()) {
jSplitPane1.setRightComponent(jPanelXML);
} else {
jSplitPane1.setRightComponent(jPanel1);
}
// update the workbench view menu
Component o = parentIFrame.getDesktopPane().getParent();
while (o != null) {
if (o.getClass() == Workbench.class) {
((Workbench) o).getViewXmlMenuItem().setSelected(editModeXML);
break;
}
o = o.getParent();
}
return isEditModeXML();
}
代码示例来源:origin: com.eas.platypus/platypus-js-forms
@ScriptFunction
@Override
public void setLeft(int aValue) {
if (super.getParent() != null && super.getParent().getLayout() instanceof MarginLayout) {
MarginLayout.ajustLeft(this, aValue);
}
super.setLocation(aValue, getTop());
}
代码示例来源:origin: com.eas.platypus/platypus-js-forms
@ScriptFunction
@Override
public void setTop(int aValue) {
if (super.getParent() != null && super.getParent().getLayout() instanceof MarginLayout) {
MarginLayout.ajustTop(this, aValue);
}
super.setLocation(getLeft(), aValue);
}
代码示例来源:origin: org.jclarion/clarion-runtime
private void setPosition(int ratio)
{
Dimension preferredSize = component.getPreferredSize();
JDesktopPane pane = (JDesktopPane)component.getParent();
JScrollPane scroll = (JScrollPane)pane.getParent().getParent();
JViewport port = scroll.getViewport();
Rectangle bounds = port.getViewRect();
component.setLocation(
bounds.x+bounds.width-preferredSize.width,
bounds.y+bounds.height-preferredSize.height*ratio/100);
if (!component.isVisible()) {
component.setVisible(true);
pane.moveToFront(component);
}
component.repaint();
}
代码示例来源:origin: org.jclarion/clarion-runtime
JScrollPane scroll = (JScrollPane)pane.getParent().getParent();
JViewport port = scroll.getViewport();
Rectangle bounds = port.getViewRect();
内容来源于网络,如有侵权,请联系作者删除!