protected Dialog getDialogContainer() { Container top = controls.getTopLevelAncestor(); return (Dialog) (top instanceof Dialog ? top : null); }
protected Frame getFrameContainer() { Container top = controls.getTopLevelAncestor(); return (Frame) (top instanceof Frame ? top : null); }
public boolean validateAndWriteBack(JPanel panel, Object objectWithTunables) { // no tunables found, everything OK for task to proceed if (panel == null) { return true; } else if (panel == HANDLER_CANCEL_PANEL) { // found the special case of the file handle cancel panel, // which means we should quit now return false; } else { if (objectWithTunables instanceof RequestsUIHelper) { dialogWindow = (Window)panel.getTopLevelAncestor(); ((RequestsUIHelper)objectWithTunables).setUIHelper(this); } return displayGUI(panel, objectWithTunables); } }
jd.pack(); jd.setSize(400, 350); jd.setLocation(m_aboutPanel.getTopLevelAncestor().getLocationOnScreen().x + m_aboutPanel.getTopLevelAncestor().getSize().width, m_aboutPanel .getTopLevelAncestor().getLocationOnScreen().y); jd.setVisible(true); m_HelpDialog = jd;
jd.pack(); jd.setSize(400, 350); jd.setLocation(m_aboutPanel.getTopLevelAncestor().getLocationOnScreen().x + m_aboutPanel.getTopLevelAncestor().getSize().width, m_aboutPanel .getTopLevelAncestor().getLocationOnScreen().y); jd.setVisible(true); m_HelpDialog = jd;
jd.pack(); jd.setSize(400, 350); jd.setLocation(aboutPanel.getTopLevelAncestor().getLocationOnScreen().x + aboutPanel.getTopLevelAncestor().getSize().width, aboutPanel .getTopLevelAncestor().getLocationOnScreen().y); jd.setVisible(true);
jd.pack(); jd.setSize(400, 350); jd.setLocation(aboutPanel.getTopLevelAncestor().getLocationOnScreen().x + aboutPanel.getTopLevelAncestor().getSize().width, aboutPanel .getTopLevelAncestor().getLocationOnScreen().y); jd.setVisible(true);
/** * opens the help dialog for the capabilities. */ protected void openCapabilitiesHelpDialog() { if (PropertyDialog.getParentDialog(this) != null) { m_CapabilitiesDialog = new CapabilitiesHelpDialog( PropertyDialog.getParentDialog(this)); } else { m_CapabilitiesDialog = new CapabilitiesHelpDialog( PropertyDialog.getParentFrame(this)); } m_CapabilitiesDialog.setSize(400, 350); m_CapabilitiesDialog.setLocation(m_aboutPanel.getTopLevelAncestor() .getLocationOnScreen().x + m_aboutPanel.getTopLevelAncestor().getSize().width, m_aboutPanel .getTopLevelAncestor().getLocationOnScreen().y); m_CapabilitiesDialog.setVisible(true); addPropertyChangeListener(m_CapabilitiesDialog); }
/** * opens the help dialog for the capabilities. */ protected void openCapabilitiesHelpDialog() { if (PropertyDialog.getParentDialog(this) != null) { m_CapabilitiesDialog = new CapabilitiesHelpDialog( PropertyDialog.getParentDialog(this)); } else { m_CapabilitiesDialog = new CapabilitiesHelpDialog( PropertyDialog.getParentFrame(this)); } m_CapabilitiesDialog.setSize(400, 350); m_CapabilitiesDialog.setLocation(m_aboutPanel.getTopLevelAncestor() .getLocationOnScreen().x + m_aboutPanel.getTopLevelAncestor().getSize().width, m_aboutPanel .getTopLevelAncestor().getLocationOnScreen().y); m_CapabilitiesDialog.setVisible(true); addPropertyChangeListener(m_CapabilitiesDialog); }
public void actionPerformed(ActionEvent e) { String label = e.getActionCommand(); if ("Add overlays".equals(label)) { Overlayer o; Dialog d = getDialogContainer(); o = d == null ? new Overlayer(getFrameContainer()) : new Overlayer(d); o.setLocationRelativeTo(controls.getTopLevelAncestor()); o.setVisible(true); } else if ("Crop boards".equals(label)) { Cropper crop; Dialog d = getDialogContainer(); crop = d == null ? new Cropper(getFrameContainer()) : new Cropper(d); crop.setLocationRelativeTo(controls.getTopLevelAncestor()); crop.setVisible(true); } else if ("Terrain SSR".equals(label)) { currentBoards = getBoardsFromControls(); terrain.setup(currentBoards); } else { super.actionPerformed(e); } }
public Condition evaluate(I_EncodeBusinessProcess process, I_Work worker) throws TaskFailedException { try { I_ConfigAceFrame config = (I_ConfigAceFrame) worker.readAttachement(WorkerAttachmentKeys.ACE_FRAME_CONFIG.name()); SubversionData svd = new SubversionData(); svd.setRepositoryUrlStr(svnUrl); List<String> listing = config.svnList(svd); String selectedProfile = (String) worker.selectFromList(listing.toArray(), "Select profile", "Please select the profile to checkout to your local bundle"); JOptionPane.showMessageDialog(config.getWorkflowPanel().getTopLevelAncestor(), "Selected: " + selectedProfile); return Condition.CONTINUE; } catch (IllegalArgumentException e) { throw new TaskFailedException(e); } catch (ClientException e) { throw new TaskFailedException(e); } }
JDialog dialog = (JDialog) thisPanel.getTopLevelAncestor(); dialog.setSize(DEFAULT_WIDTH,DEFAULT_HEIGHT);
JDialog dialog = (JDialog) thisPanel.getTopLevelAncestor(); dialog.setSize(DEFAULT_WIDTH,DEFAULT_HEIGHT);