本文整理了Java中javax.swing.JInternalFrame.getFrameIcon()
方法的一些代码示例,展示了JInternalFrame.getFrameIcon()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。JInternalFrame.getFrameIcon()
方法的具体详情如下:
包路径:javax.swing.JInternalFrame
类名称:JInternalFrame
方法名:getFrameIcon
暂无
代码示例来源:origin: net.sf.squirrel-sql.thirdparty-non-maven/skinlf
/**
* Gets the FrameIcon attribute of the InternalFrameWindow object
*
* @return The FrameIcon value
*/
public Icon getFrameIcon() {
return frame.getFrameIcon();
}
代码示例来源:origin: com.github.insubstantial/substance
@Override
public void paint(Graphics g) {
if (frame.getFrameIcon() != null) {
frame.getFrameIcon().paintIcon(this, g, 0, 0);
} else {
Icon icon = UIManager.getIcon("InternalFrame.icon");
if (icon != null) {
icon.paintIcon(this, g, 0, 0);
}
}
}
代码示例来源:origin: com.jtattoo/JTattoo
protected int getIconWidth() {
Image image = iconToImage(frame.getFrameIcon());
if (image != null) {
int h = getHeight();
int ih = image.getHeight(null);
int iw = image.getWidth(null);
if (ih > h) {
double fac = (double) iw / (double) ih;
ih = h - 1;
iw = (int) (fac * (double) ih);
}
return iw;
}
return 0;
}
代码示例来源: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: com.jtattoo/JTattoo
protected int paintIcon(Graphics g, int x) {
Image image = iconToImage(frame.getFrameIcon());
if (image != null) {
Graphics2D g2D = (Graphics2D)g;
Object savedHint = g2D.getRenderingHint(RenderingHints.KEY_INTERPOLATION);
if (JTattooUtilities.getJavaVersion() >= 1.6) {
g2D.setRenderingHint(RenderingHints.KEY_INTERPOLATION, RenderingHints.VALUE_INTERPOLATION_BILINEAR);
}
int h = getHeight();
int ih = image.getHeight(null);
int iw = image.getWidth(null);
if (ih <= h) {
g2D.drawImage(image, x, (h - ih) / 2, iw, ih, null);
} else {
double fac = (double) iw / (double) ih;
ih = h;
iw = (int) (fac * (double) ih);
g2D.drawImage(image, x, 0, iw, ih, null);
}
if (savedHint != null) {
g2D.setRenderingHint(RenderingHints.KEY_INTERPOLATION, savedHint);
}
return iw;
}
return 0;
}
代码示例来源:origin: net.sf.nimrod/nimrod-laf
public void paint( Graphics g, JComponent c) {
if ( frame.getFrameIcon() != antIcon ) {
antIcon = frame.getFrameIcon();
resizeIcon = NimRODUtils.reescala( antIcon, bigWidth, bigHeight);
代码示例来源:origin: khuxtable/seaglass
/**
* Resets the menuButton icon to match that of the frame.
*/
private void updateMenuIcon() {
Icon frameIcon = frame.getFrameIcon();
SeaGlassContext context = getContext(this);
if (frameIcon != null) {
Dimension maxSize = (Dimension) context.getStyle().get(context, "InternalFrameTitlePane.maxFrameIconSize");
int maxWidth = 16;
int maxHeight = 16;
if (maxSize != null) {
maxWidth = maxSize.width;
maxHeight = maxSize.height;
}
if ((frameIcon.getIconWidth() > maxWidth || frameIcon.getIconHeight() > maxHeight) && (frameIcon instanceof ImageIcon)) {
frameIcon = new ImageIcon(((ImageIcon) frameIcon).getImage().getScaledInstance(maxWidth, maxHeight, Image.SCALE_SMOOTH));
}
}
context.dispose();
menuButton.setIcon(frameIcon);
}
代码示例来源:origin: org.fudaa.framework.fudaa/fudaa-common
protected void setValue(final Object _value) {
final JInternalFrame f = (JInternalFrame) _value;
setText(f.getTitle());
final Icon frameIcon = f.getFrameIcon();
setIcon(frameIcon == null ? BuResource.BU.getToolIcon("bu_internalframe_corner_ocean") : frameIcon);
}
};
代码示例来源:origin: com.jtattoo/JTattoo
Icon icon = isMacStyleWindowDecoration() ? null : frame.getFrameIcon();
if (icon == null) {
height = Math.max(fm.getHeight() + 6, 16);
代码示例来源:origin: net.sf.squirrel-sql.thirdparty-non-maven/napkinlaf
Icon icon = frame.getFrameIcon();
int fontHeight = fm.getHeight();
代码示例来源:origin: com.jtattoo/JTattoo
if (!isPalette) {
int fontHeight = fm.getHeight() + 5;
Icon icon = isMacStyleWindowDecoration() ? null : frame.getFrameIcon();
int iconHeight = 0;
if (icon != null) {
代码示例来源:origin: com.jtattoo/JTattoo
if (!isPalette) {
int fontHeight = fm.getHeight() + 5;
Icon icon = isMacStyleWindowDecoration() ? null : frame.getFrameIcon();
int iconHeight = 0;
if (icon != null) {
代码示例来源:origin: net.sf.squirrel-sql.thirdparty-non-maven/skinlf
/**
* Description of the Method
*/
protected void installComponents() {
frame = desktopIcon.getInternalFrame();
desktopIcon.setBorder(null);
iconPane = new JLabel(frame.getTitle(),
frame.getFrameIcon(),
JLabel.CENTER);
iconPane.setHorizontalTextPosition(JLabel.CENTER);
iconPane.setVerticalTextPosition(JLabel.BOTTOM);
iconPane.setHorizontalAlignment(JLabel.CENTER);
desktopIcon.setLayout(new BorderLayout());
desktopIcon.add(iconPane, BorderLayout.CENTER);
desktopIcon.setOpaque(true);
}
代码示例来源:origin: com.github.insubstantial/substance
Icon icon = frame.getFrameIcon();
int iconHeight = 0;
if (icon != null) {
代码示例来源:origin: net.sf.squirrel-sql.thirdparty-non-maven/toniclf
/** Installs the components for this delegate */
protected void installComponents()
{
frame = desktopIcon.getInternalFrame();
Icon icon = frame.getFrameIcon();
String title = frame.getTitle();
button = new JButton (title, icon);
button.addActionListener( new ActionListener()
{
public void actionPerformed(ActionEvent e)
{
deiconize();
}
});
button.setFont(desktopIcon.getFont());
button.setBackground(desktopIcon.getBackground());
button.setForeground(desktopIcon.getForeground());
int buttonH = button.getPreferredSize().height;
label = new JLabel(" ");
label.setBorder( new MatteBorder( 0, 2, 0, 1, desktopIcon.getBackground()) );
desktopIcon.setLayout(new BorderLayout(2, 0));
desktopIcon.add(button, BorderLayout.CENTER);
desktopIcon.add(label, BorderLayout.WEST);
}
代码示例来源:origin: org.fudaa.framework.fudaa/fudaa-common
protected void setValue(Object _value) {
JInternalFrame internalFrame = (JInternalFrame) _value;
setIcon((internalFrame).getFrameIcon());
setToolTipText((internalFrame).getTitle());
// setBackground(Color.ORANGE);
setOpaque(((FudaaInternalFrameModel) getModel()).desk_.getSelectedFrame() == internalFrame);
setBorder(border_);
}
}
代码示例来源:origin: com.jtattoo/JTattoo
Icon icon = frame.getFrameIcon();
if (icon != null) {
maxWidth -= icon.getIconWidth();
代码示例来源:origin: fcrepo3/fcrepo
menu.setIcon(array[i].getFrameIcon());
add(menu);
代码示例来源:origin: khuxtable/seaglass
protected void installComponents() {
if (UIManager.getBoolean("InternalFrame.useTaskBar")) {
iconPane = new JToggleButton(frame.getTitle(), frame.getFrameIcon()) {
public String getToolTipText() {
return getText();
}
public JPopupMenu getComponentPopupMenu() {
return frame.getComponentPopupMenu();
}
};
ToolTipManager.sharedInstance().registerComponent(iconPane);
iconPane.setFont(desktopIcon.getFont());
iconPane.setBackground(desktopIcon.getBackground());
iconPane.setForeground(desktopIcon.getForeground());
} else {
iconPane = new SeaGlassInternalFrameTitlePane(frame);
iconPane.setName("InternalFrame.northPane");
}
desktopIcon.setLayout(new BorderLayout());
desktopIcon.add(iconPane, BorderLayout.CENTER);
}
代码示例来源: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();
}
内容来源于网络,如有侵权,请联系作者删除!