private static void maximizeIfNeeded(final Window owner) {
   if (owner == null) return;
   if (owner instanceof Frame) {
     Frame f = (Frame) owner;
     if (f.getState() == Frame.ICONIFIED) {
       f.setState(Frame.NORMAL);
     }
   }
 }
示例#2
0
 /** Raise the current plot. */
 public void raiseCurrentPlot() {
   int row = table.getSelectedRow();
   if (row > -1) {
     PlotControl currentPlot = globalList.getPlot(row);
     try {
       Frame baseFrame = (Frame) SwingUtilities.getWindowAncestor(currentPlot);
       baseFrame.setState(Frame.NORMAL);
       baseFrame.setVisible(true);
     } catch (Exception e) {
       // Do nothing.
     }
   }
 }