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

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

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

JDialog.getParent介绍

暂无

代码示例

代码示例来源:origin: org.apache.cayenne.modeler/cayenne-modeler

public CayenneModelerFrame getParentEditor() {
  return (CayenneModelerFrame) super.getParent();
}

代码示例来源:origin: GoldenGnu/jeveassets

private void centerWindow() {
  jWindow.pack();
  jWindow.setLocationRelativeTo(jWindow.getParent());
}

代码示例来源:origin: stackoverflow.com

IndeterminateLoadingDialog ild;

public Task _Task() {
  JDialog dialog = new JDialog(// parent frame);
  ild = new IndeterminateLoadingDialog(this);
  dialog.add(ild);
  dialog.pack();
  dialog.setDefaultCloseOperation(JDialog.DISPOSE_ON_CLOSE);
  dialog.setLocationRelativeTo(dialog.getParent());
  dialog.setVisible(true);
}

代码示例来源:origin: org.codehaus.jtstand/jtstand-ui

public static void centerOnParent(JDialog dialog) {
  centerOn(dialog, dialog.getParent());
}

代码示例来源:origin: stackoverflow.com

Icon icon = new ImageIcon("d:/temp/CheckBox.gif");  
JOptionPane jp = new JOptionPane("Session Expired - Please Re Login"),   
 JOptionPane.INFORMATION_MESSAGE,   
 JOptionPane.WARNING_MESSAGE,   
 icon);  
JDialog dialog = jp.createDialog(null, "Session Expired - Please Re Login");
((Frame)dialog.getParent()).setIconImage(((ImageIcon)icon).getImage());  
dialog.setResizable(true);  
dialog.setVisible(true);

代码示例来源:origin: bcdev/beam

protected AbstractDialog(JDialog dialog, int buttonMask, Object[] otherButtons, String helpID) {
  this.parent = (Window) dialog.getParent();
  this.dialog = dialog;
  this.buttonMask = buttonMask;
  this.buttonMap = new HashMap<Integer, AbstractButton>(5);
  setButtonID(0);
  initUI(otherButtons);
  setHelpID(helpID);
}

代码示例来源:origin: senbox-org/snap-desktop

protected AbstractDialog(JDialog dialog, int buttonMask, Object[] otherButtons, String helpID) {
  this.parent = (Window) dialog.getParent();
  this.dialog = dialog;
  this.buttonMask = buttonMask;
  this.buttonMap = new HashMap<>(5);
  setComponentName(dialog);
  setButtonID(0);
  initUI(otherButtons);
  setHelpID(helpID);
}

代码示例来源:origin: bcdev/beam

/**
 * Displays the dialog if this {@code AssistantPane} with
 * the given {@link AssistantPage page} as first page.
 *
 * @param firstPage The first page which is displayed in the dialog.
 * @param bounds    The screen bounds of the window, may be {@code null}.
 */
public void show(AssistantPage firstPage, Rectangle bounds) {
  initPage(firstPage);
  setCurrentPage(firstPage);
  if (bounds == null) {
    dialog.setSize(480, 320);
    UIUtils.centerComponent(dialog, dialog.getParent());
  } else {
    dialog.setBounds(bounds);
  }
  dialog.setVisible(true);
}

代码示例来源:origin: senbox-org/snap-desktop

/**
 * Displays the dialog if this {@code AssistantPane} with
 * the given {@link AssistantPage page} as first page.
 *
 * @param firstPage The first page which is displayed in the dialog.
 * @param bounds    The screen bounds of the window, may be {@code null}.
 */
public void show(AssistantPage firstPage, Rectangle bounds) {
  initPage(firstPage);
  setCurrentPage(firstPage);
  if (bounds == null) {
    dialog.setSize(480, 320);
    UIUtils.centerComponent(dialog, dialog.getParent());
  } else {
    dialog.setBounds(bounds);
  }
  dialog.setVisible(true);
}

相关文章

JDialog类方法