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

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

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

JInternalFrame.setFrameIcon介绍

暂无

代码示例

代码示例来源:origin: net.sf.nimrod/nimrod-laf

public void actionPerformed( ActionEvent ev) {
  jif.setFrameIcon( nextIcon());
 }
}

代码示例来源:origin: wildfly/wildfly-core

private void configureMyJInternalFrame() {
    ImageIcon icon = new ImageIcon(GuiMain.getJBossIcon());
    Component component = jconsolePanel;

    while (component != null) {
      component = component.getParent();
      if (component instanceof JInternalFrame) {
        JInternalFrame frame = (JInternalFrame)component;
        frame.setFrameIcon(icon);
        return;
      }
    }
  }
}

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

JInternalFrame jInternalFrame1 = new JInternalFrame("Test Internal Frame",false,false,false,false);

try {
 URL url = new URL("images/icon.gif");
 ImageIcon icon = new ImageIcon(url);
 jInternalFrame1.setFrameIcon(icon);
} 
catch (MalformedURLException ex) 
{
  //whatever you want to put here
}

代码示例来源:origin: org.wildfly.core/wildfly-cli

private void configureMyJInternalFrame() {
    ImageIcon icon = new ImageIcon(GuiMain.getJBossIcon());
    Component component = jconsolePanel;

    while (component != null) {
      component = component.getParent();
      if (component instanceof JInternalFrame) {
        JInternalFrame frame = (JInternalFrame)component;
        frame.setFrameIcon(icon);
        return;
      }
    }
  }
}

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

public void propertyChange(PropertyChangeEvent evt) {
    Content content = (Content) evt.getSource();
    if (content.isMinimized())
      return;
    if (!content.isDetached()) {
      JInternalFrame internalFrame = getInternalFrame(content);
      if (internalFrame != null)
        internalFrame.setFrameIcon((Icon) evt.getNewValue());
      else
        throw new IllegalStateException("Invalid content ui state.");
    }
  }
}

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

@ScriptFunction
public void setIcon(ImageIcon aValue) {
  icon = aValue;
  if (surface instanceof JDialog) {
    ((JDialog) surface).setIconImage(icon != null ? icon.getImage() : null);
  }
  if (surface instanceof JInternalFrame) {
    ((JInternalFrame) surface).setFrameIcon(icon);
  }
  if (surface instanceof JFrame) {
    ((JFrame) surface).setIconImage(icon != null ? icon.getImage() : null);
  }
}

代码示例来源:origin: com.jtattoo/JTattoo

protected void installDefaults() {
  super.installDefaults();
  Icon frameIcon = frame.getFrameIcon();
  if (frameIcon == null || frameIcon instanceof LazyImageIcon) {
    frame.setFrameIcon(UIManager.getIcon("InternalFrame.icon"));
  }
}

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

Image icon = source.getIcon();
if (icon != null) {
  frame.setFrameIcon(new ImageIcon(icon));
} else {
  frame.setFrameIcon(null);

代码示例来源:origin: net.sf.nimrod/nimrod-laf

public void actionPerformed( ActionEvent ev) {
  JInternalFrame jif = new JInternalFrame( "The Long Titled Internal Frame, n� (this is to test \"strange caracters\" titles)" + pos / 5, true, true, true, true);
  
  jif.setVisible( true);
  jif.setFrameIcon( nextIcon());
  
  jif.setIconifiable( true);
  jif.setMaximizable( true);
  jif.setClosable( true);
  
  JButton but = new JButton( "Change Icon");
  but.addActionListener( new dummy( jif));
  jif.getContentPane().add( new JLabel( "Another InternalFrame"));
  jif.getContentPane().add( but, BorderLayout.SOUTH);
  
  jif.setLocation( new Point( pos, pos));
  
  pos += 5;
  jif.pack();
  desktop.add( jif);
  
  try {
   jif.setSelected( true);
  }
  catch ( PropertyVetoException e) {}
 }
}

代码示例来源:origin: edu.illinois.lis/indri

iframe.setFrameIcon(new ImageIcon(icon));
iframe.setDefaultCloseOperation(JFrame.DISPOSE_ON_CLOSE);
iframe.pack();

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

private void configureControl() {
  internalFrame.setTitle(getPageComponent().getTitle());
  internalFrame.setFrameIcon(getPageComponent().getIcon());
}

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

protected void initInternalFrame() {
  internalFrame = new JInternalFrame(content.getTitle(), true, true, true, true);
  internalFrame.setFrameIcon(content.getIcon());
  internalFrame.getContentPane().add(content.getComponent());
  internalFrame.setClosable(closable);
  internalFrame.setMaximizable(true);
  initInternalFrameListeners();
}

代码示例来源:origin: org.appdapter/org.appdapter.lib.gui

private JInternalFrame createJInternalFrame(String name, Class c, Component view) {
  JInternalFrame frame = new JInternalFrame(name, true, true, true, true);
  frame.setResizable(true);
  try {
    // Get an icon for the object
    Icon icon;
    icon = Utility.getIcon(c);
    frame.setFrameIcon(icon);
  } catch (Exception e) {
  }
  // Put the GUI and icon in the frame
  frame.getContentPane().add(view);
  // Listen to the frame, so we notice if it closes
  frame.addInternalFrameListener(listener);
  BoxPanelSwitchableView bsv = Utility.getBoxPanelTabPane();
  bsv.addComponent(name, frame, DisplayType.FRAME);
  return frame;
}

代码示例来源:origin: org.jspresso.framework/jspresso-swing-application

/**
 * Creates a new JInternalFrame and populates it with a view.
 *
 * @param view
 *          the view to be set into the internal frame.
 * @return the constructed internal frame.
 */
private JInternalFrame createJInternalFrame(JComponent view, String title,
  Icon frameIcon) {
 JInternalFrame internalFrame = new JInternalFrame(title);
 internalFrame.setFrameIcon(frameIcon);
 internalFrame.setResizable(true);
 internalFrame.setClosable(true);
 internalFrame.setMaximizable(true);
 internalFrame.setIconifiable(true);
 internalFrame.getContentPane().add(view, BorderLayout.CENTER);
 internalFrame.setDefaultCloseOperation(WindowConstants.HIDE_ON_CLOSE);
 internalFrame.setGlassPane(createHermeticGlassPane());
 return internalFrame;
}

代码示例来源:origin: khuxtable/seaglass

private void updateStyle(JComponent c) {
  SeaGlassContext context = getContext(c, ENABLED);
  SynthStyle oldStyle = style;
  style = SeaGlassLookAndFeel.updateStyle(context, this);
  if (style != oldStyle) {
    Icon frameIcon = frame.getFrameIcon();
    if (frameIcon == null || frameIcon instanceof UIResource) {
      frame.setFrameIcon(context.getStyle().getIcon(context, "InternalFrame.icon"));
    }
    if (oldStyle != null) {
      uninstallKeyboardActions();
      installKeyboardActions();
    }
  }
  context.dispose();
}

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

if (iconImage != null) {
  imageIcon = new ImageIcon(iconImage);
  internalFrame.setFrameIcon(imageIcon);

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

internalFrame.setFrameIcon(icon);
internalFrame.setTitle(title);
internalFrame.setResizable(resizable);

代码示例来源:origin: org.jclarion/clarion-runtime

((JInternalFrame) win).setFrameIcon(CWin.getInstance()
    .scale(CWin.getInstance().getIcon(name, 16, 16),
        name, 16, 16));

代码示例来源:origin: org.jspresso/jspresso-swing-application

/**
 * Creates a new JInternalFrame and populates it with a view.
 * 
 * @param view
 *            the view to be set into the internal frame.
 * @return the constructed internal frame.
 */
private JInternalFrame createJInternalFrame(IView<JComponent> view) {
 JInternalFrame internalFrame = new JInternalFrame(view.getDescriptor()
   .getI18nName(getTranslationProvider(), getLocale()));
 internalFrame.setFrameIcon(getIconFactory().getIcon(
   view.getDescriptor().getIconImageURL(), IIconFactory.SMALL_ICON_SIZE));
 internalFrame.setResizable(true);
 internalFrame.setClosable(false);
 internalFrame.setMaximizable(true);
 internalFrame.setIconifiable(true);
 internalFrame.getContentPane().add(view.getPeer(), BorderLayout.CENTER);
 internalFrame.setDefaultCloseOperation(WindowConstants.HIDE_ON_CLOSE);
 internalFrame.setGlassPane(createHermeticGlassPane());
 return internalFrame;
}

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

frame.setFrameIcon(icon);

相关文章

JInternalFrame类方法