javax.swing.JDesktopPane.getParent()方法的使用及代码示例

x33g5p2x  于2022-01-21 转载在 其他  
字(2.1k)|赞(0)|评价(0)|浏览(129)

本文整理了Java中javax.swing.JDesktopPane.getParent()方法的一些代码示例,展示了JDesktopPane.getParent()的具体用法。这些代码示例主要来源于Github/Stackoverflow/Maven等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。JDesktopPane.getParent()方法的具体详情如下:
包路径:javax.swing.JDesktopPane
类名称:JDesktopPane
方法名:getParent

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();

相关文章