javax.swing.JInternalFrame.setIcon()方法的使用及代码示例

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

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

JInternalFrame.setIcon介绍

暂无

代码示例

代码示例来源:origin: pentaho/mondrian

public void actionPerformed(ActionEvent evt) {
    try {
      if (jf.isIcon()) {
        jf.setIcon(false);
      } else {
        jf.setSelected(true);
      }
    } catch (Exception ex) {
      LOGGER.error("queryMenuItem", ex);
    }
  }
});

代码示例来源:origin: pentaho/mondrian

public void actionPerformed(ActionEvent evt) {
    try {
      if (jf.isIcon()) {
        jf.setIcon(false);
      } else {
        jf.setSelected(true);
      }
    } catch (Exception ex) {
      LOGGER.error("queryMenuItem", ex);
    }
  }
});

代码示例来源:origin: pentaho/mondrian

public void actionPerformed(ActionEvent evt) {
    try {
      if (schemaFrame.isIcon()) {
        schemaFrame.setIcon(false);
      } else {
        schemaFrame.setSelected(true);
      }
    } catch (Exception ex) {
      LOGGER.error("schemaMenuItem", ex);
    }
  }
});

代码示例来源:origin: pentaho/mondrian

private void minimizeMenuItemActionPerformed(
  ActionEvent evt)
{
  try {
    for (JInternalFrame sf : getAllFrames()) {
      if (sf != null && !sf.isIcon()) {
        sf.setIcon(true);
      }
    }
  } catch (Exception ex) {
    LOGGER.error("minimizeMenuItemActionPerformed", ex);
    // do nothing
  }
}

代码示例来源:origin: pentaho/mondrian

private void maximizeMenuItemActionPerformed(
  ActionEvent evt)
{
  try {
    for (JInternalFrame sf : getAllFrames()) {
      if (sf != null) {
        sf.setIcon(false);
        sf.setMaximum(true);
      }
    }
  } catch (Exception ex) {
    LOGGER.error("maximizeMenuItemActionPerformed", ex);
    // do nothing
  }
}

代码示例来源:origin: net.sf.squirrel-sql.thirdparty-non-maven/skinlf

/**
 * Sets the Icon attribute of the InternalFrameWindow object
 * 
 * @param b The new Icon value
 * @exception PropertyVetoException Description of Exception
 */
public void setIcon(boolean b) throws PropertyVetoException {
 frame.setIcon(b);
}

代码示例来源:origin: abbot/abbot

public void run() {
    try {
      frame.setIcon(b);
    }
    catch(PropertyVetoException e) {
      veto.e = e;
    }
  }
});

代码示例来源:origin: org.fudaa.framework.ctulu/ctulu-bu

public void propertyChange(PropertyChangeEvent _evt) {
  if (Boolean.TRUE.equals(_evt.getNewValue()) && "selected".equals(_evt.getPropertyName())) {
   final JInternalFrame fintern = (JInternalFrame) _evt.getSource();
   if (fintern.isIcon()) {
    try {
     fintern.setIcon(false);
    } catch (PropertyVetoException ex) {}
   }
  }
 }
});

代码示例来源:origin: fcrepo3/fcrepo

public void minimizeFrames() {
  JInternalFrame[] array = getAllFrames();
  for (JInternalFrame element : array) {
    try {
      element.setIcon(true);
    } catch (PropertyVetoException pve) {
    }
  }
}

代码示例来源:origin: fcrepo3/fcrepo

public void restoreFrames() {
  JInternalFrame[] array = getAllFrames();
  for (JInternalFrame element : array) {
    try {
      element.setIcon(false);
    } catch (PropertyVetoException pve) {
    }
  }
}

代码示例来源:origin: robotframework/SwingLibrary

private void iconify(String identifier, boolean shouldIconify) {
  try {
    ((JInternalFrame) createOperator(identifier).getSource())
        .setIcon(shouldIconify);
  } catch (PropertyVetoException e) {
    throw new RuntimeException(e);
  }
}

代码示例来源:origin: net.sourceforge.mydoggy/mydoggy-plaf

public void setIconified(boolean iconified) {
  boolean old = internalFrame.isIcon();
  if (old == iconified)
    return;
  try {
    internalFrame.setIcon(iconified);
  } catch (PropertyVetoException e) {
    throw new RuntimeException(e);
  }
  firePropertyChangeEvent("iconified", old, iconified);
}

代码示例来源:origin: cytoscape/application

/**
 * Sets the focus of the passed network, if possible The Network ID
 * corresponds to the CyNetworkView.getNetwork().getIdentifier()
 */
protected void setFocus(String network_id) {
  if (networkViewMap.containsKey(network_id)) {
    try {
      networkViewMap.get(network_id).setIcon(false);
      networkViewMap.get(network_id).show();
      // fires internalFrameActivated
      networkViewMap.get(network_id).setSelected(true);
    } catch (Exception e) {
      logger.warn("Network View unable to be focused");
    }
  }
}

代码示例来源:origin: joel-costigliola/assertj-swing

@RunsInEDT
static void setMaximum(final @Nonnull JInternalFrame internalFrame, final @Nonnull JInternalFrameAction action) {
 execute(() -> {
  internalFrame.setIcon(false);
  internalFrame.setMaximum(action.value);
 });
}

代码示例来源:origin: joel-costigliola/assertj-swing

@RunsInEDT
static void setIcon(final @Nonnull JInternalFrame internalFrame, final @Nonnull JInternalFrameAction action) {
 execute(() -> {
  internalFrame.setMaximum(false);
  internalFrame.setIcon(action.value);
 });
}

代码示例来源:origin: com.eas.platypus/platypus-js-forms

@ScriptFunction(jsDoc = TO_FRONT_JSDOC)
public void toFront() {
  if (surface != null) {
    if (surface instanceof JInternalFrame) {
      try {
        ((JInternalFrame) surface).setIcon(false);
      } catch (Exception e) {
      }
      ((JInternalFrame) surface).toFront();
    } else if (surface instanceof JFrame) {
      ((JFrame) surface).toFront();
    }
  }
}
private static final String GET_MINIMIZED_JSDOC = ""

代码示例来源:origin: net.sourceforge.ondex.apps/ovtk2

@Override
public void actionPerformed(ActionEvent e) {
  List<RegisteredFrame> frames = frameRegistry.getInternalFrames();
  for (RegisteredFrame frame : frames) {
    if (frame instanceof JInternalFrame && (group == null || frame.getGroup().equals(group))) {
      JInternalFrame internalF = ((JInternalFrame) frame);
      if (internalF.isIconifiable() && !internalF.isIcon()) {
        try {
          internalF.setIcon(true);
        } catch (PropertyVetoException e1) {
          e1.printStackTrace();
        }
      }
    }
  }
}

代码示例来源:origin: com.eas.platypus/platypus-js-forms

@ScriptFunction(jsDoc = MINIMIZE_ALL_JSDOC)
public void minimizeAll() throws PropertyVetoException {
  for (JInternalFrame f : getAllFrames()) {
    if (f.isIconifiable() && !f.isIcon()) {
      f.setIcon(true);
    }
  }
}

代码示例来源:origin: com.eas.platypus/platypus-js-forms

@ScriptFunction(jsDoc = MAXIMIZE_ALL_JSDOC)
public void maximizeAll() throws PropertyVetoException {
  for (JInternalFrame f : getAllFrames()) {
    if (f.isIcon()) {
      f.setIcon(false);
    }
    if (f.isMaximizable()) {
      f.setMaximum(true);
    }
  }
}

代码示例来源:origin: com.eas.platypus/platypus-js-forms

@ScriptFunction(jsDoc = RESTORE_ALL_JSDOC)
public void restoreAll() throws PropertyVetoException {
  for (JInternalFrame f : getAllFrames()) {
    if (f.isIcon()) {
      f.setIcon(false);
    }
    if (f.isMaximum()) {
      f.setMaximum(false);
    }
  }
}

相关文章

JInternalFrame类方法