Java Code Examples for javax.swing.plaf.metal.MetalIconFactory

The following examples show how to use javax.swing.plaf.metal.MetalIconFactory. These examples are extracted from open source projects. You can vote up the ones you like or vote down the ones you don't like, and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example 1
@Override
public void addCustomEntriesToTable(UIDefaults table) {
    super.addCustomEntriesToTable(table);

    final int internalFrameIconSize = 22;
    table.put("InternalFrame.closeIcon", MetalIconFactory.
            getInternalFrameCloseIcon(internalFrameIconSize));
    table.put("InternalFrame.maximizeIcon", MetalIconFactory.
            getInternalFrameMaximizeIcon(internalFrameIconSize));
    table.put("InternalFrame.iconifyIcon", MetalIconFactory.
            getInternalFrameMinimizeIcon(internalFrameIconSize));
    table.put("InternalFrame.minimizeIcon", MetalIconFactory.
            getInternalFrameAltMaximizeIcon(internalFrameIconSize));


    table.put("ScrollBar.width", 21);



}
 
Example 2
Source Project: TencentKona-8   Source File: DemoMetalTheme.java    License: GNU General Public License v2.0 6 votes vote down vote up
@Override
public void addCustomEntriesToTable(UIDefaults table) {
    super.addCustomEntriesToTable(table);

    final int internalFrameIconSize = 22;
    table.put("InternalFrame.closeIcon", MetalIconFactory.
            getInternalFrameCloseIcon(internalFrameIconSize));
    table.put("InternalFrame.maximizeIcon", MetalIconFactory.
            getInternalFrameMaximizeIcon(internalFrameIconSize));
    table.put("InternalFrame.iconifyIcon", MetalIconFactory.
            getInternalFrameMinimizeIcon(internalFrameIconSize));
    table.put("InternalFrame.minimizeIcon", MetalIconFactory.
            getInternalFrameAltMaximizeIcon(internalFrameIconSize));


    table.put("ScrollBar.width", 21);



}
 
Example 3
Source Project: jdk8u60   Source File: DemoMetalTheme.java    License: GNU General Public License v2.0 6 votes vote down vote up
@Override
public void addCustomEntriesToTable(UIDefaults table) {
    super.addCustomEntriesToTable(table);

    final int internalFrameIconSize = 22;
    table.put("InternalFrame.closeIcon", MetalIconFactory.
            getInternalFrameCloseIcon(internalFrameIconSize));
    table.put("InternalFrame.maximizeIcon", MetalIconFactory.
            getInternalFrameMaximizeIcon(internalFrameIconSize));
    table.put("InternalFrame.iconifyIcon", MetalIconFactory.
            getInternalFrameMinimizeIcon(internalFrameIconSize));
    table.put("InternalFrame.minimizeIcon", MetalIconFactory.
            getInternalFrameAltMaximizeIcon(internalFrameIconSize));


    table.put("ScrollBar.width", 21);



}
 
Example 4
Source Project: openjdk-jdk8u   Source File: DemoMetalTheme.java    License: GNU General Public License v2.0 6 votes vote down vote up
@Override
public void addCustomEntriesToTable(UIDefaults table) {
    super.addCustomEntriesToTable(table);

    final int internalFrameIconSize = 22;
    table.put("InternalFrame.closeIcon", MetalIconFactory.
            getInternalFrameCloseIcon(internalFrameIconSize));
    table.put("InternalFrame.maximizeIcon", MetalIconFactory.
            getInternalFrameMaximizeIcon(internalFrameIconSize));
    table.put("InternalFrame.iconifyIcon", MetalIconFactory.
            getInternalFrameMinimizeIcon(internalFrameIconSize));
    table.put("InternalFrame.minimizeIcon", MetalIconFactory.
            getInternalFrameAltMaximizeIcon(internalFrameIconSize));


    table.put("ScrollBar.width", 21);



}
 
Example 5
@Override
public void addCustomEntriesToTable(UIDefaults table) {
    super.addCustomEntriesToTable(table);

    final int internalFrameIconSize = 22;
    table.put("InternalFrame.closeIcon", MetalIconFactory.
            getInternalFrameCloseIcon(internalFrameIconSize));
    table.put("InternalFrame.maximizeIcon", MetalIconFactory.
            getInternalFrameMaximizeIcon(internalFrameIconSize));
    table.put("InternalFrame.iconifyIcon", MetalIconFactory.
            getInternalFrameMinimizeIcon(internalFrameIconSize));
    table.put("InternalFrame.minimizeIcon", MetalIconFactory.
            getInternalFrameAltMaximizeIcon(internalFrameIconSize));


    table.put("ScrollBar.width", 21);



}
 
Example 6
Source Project: openjdk-jdk9   Source File: DemoMetalTheme.java    License: GNU General Public License v2.0 6 votes vote down vote up
@Override
public void addCustomEntriesToTable(UIDefaults table) {
    super.addCustomEntriesToTable(table);

    final int internalFrameIconSize = 22;
    table.put("InternalFrame.closeIcon", MetalIconFactory.
            getInternalFrameCloseIcon(internalFrameIconSize));
    table.put("InternalFrame.maximizeIcon", MetalIconFactory.
            getInternalFrameMaximizeIcon(internalFrameIconSize));
    table.put("InternalFrame.iconifyIcon", MetalIconFactory.
            getInternalFrameMinimizeIcon(internalFrameIconSize));
    table.put("InternalFrame.minimizeIcon", MetalIconFactory.
            getInternalFrameAltMaximizeIcon(internalFrameIconSize));


    table.put("ScrollBar.width", 21);



}
 
Example 7
Source Project: jdk8u-jdk   Source File: DemoMetalTheme.java    License: GNU General Public License v2.0 6 votes vote down vote up
@Override
public void addCustomEntriesToTable(UIDefaults table) {
    super.addCustomEntriesToTable(table);

    final int internalFrameIconSize = 22;
    table.put("InternalFrame.closeIcon", MetalIconFactory.
            getInternalFrameCloseIcon(internalFrameIconSize));
    table.put("InternalFrame.maximizeIcon", MetalIconFactory.
            getInternalFrameMaximizeIcon(internalFrameIconSize));
    table.put("InternalFrame.iconifyIcon", MetalIconFactory.
            getInternalFrameMinimizeIcon(internalFrameIconSize));
    table.put("InternalFrame.minimizeIcon", MetalIconFactory.
            getInternalFrameAltMaximizeIcon(internalFrameIconSize));


    table.put("ScrollBar.width", 21);



}
 
Example 8
Source Project: hottub   Source File: DemoMetalTheme.java    License: GNU General Public License v2.0 6 votes vote down vote up
@Override
public void addCustomEntriesToTable(UIDefaults table) {
    super.addCustomEntriesToTable(table);

    final int internalFrameIconSize = 22;
    table.put("InternalFrame.closeIcon", MetalIconFactory.
            getInternalFrameCloseIcon(internalFrameIconSize));
    table.put("InternalFrame.maximizeIcon", MetalIconFactory.
            getInternalFrameMaximizeIcon(internalFrameIconSize));
    table.put("InternalFrame.iconifyIcon", MetalIconFactory.
            getInternalFrameMinimizeIcon(internalFrameIconSize));
    table.put("InternalFrame.minimizeIcon", MetalIconFactory.
            getInternalFrameAltMaximizeIcon(internalFrameIconSize));


    table.put("ScrollBar.width", 21);



}
 
Example 9
@Override
public void addCustomEntriesToTable(UIDefaults table) {
    super.addCustomEntriesToTable(table);

    final int internalFrameIconSize = 22;
    table.put("InternalFrame.closeIcon", MetalIconFactory.
            getInternalFrameCloseIcon(internalFrameIconSize));
    table.put("InternalFrame.maximizeIcon", MetalIconFactory.
            getInternalFrameMaximizeIcon(internalFrameIconSize));
    table.put("InternalFrame.iconifyIcon", MetalIconFactory.
            getInternalFrameMinimizeIcon(internalFrameIconSize));
    table.put("InternalFrame.minimizeIcon", MetalIconFactory.
            getInternalFrameAltMaximizeIcon(internalFrameIconSize));


    table.put("ScrollBar.width", 21);



}
 
Example 10
Source Project: openjdk-8   Source File: DemoMetalTheme.java    License: GNU General Public License v2.0 6 votes vote down vote up
@Override
public void addCustomEntriesToTable(UIDefaults table) {
    super.addCustomEntriesToTable(table);

    final int internalFrameIconSize = 22;
    table.put("InternalFrame.closeIcon", MetalIconFactory.
            getInternalFrameCloseIcon(internalFrameIconSize));
    table.put("InternalFrame.maximizeIcon", MetalIconFactory.
            getInternalFrameMaximizeIcon(internalFrameIconSize));
    table.put("InternalFrame.iconifyIcon", MetalIconFactory.
            getInternalFrameMinimizeIcon(internalFrameIconSize));
    table.put("InternalFrame.minimizeIcon", MetalIconFactory.
            getInternalFrameAltMaximizeIcon(internalFrameIconSize));


    table.put("ScrollBar.width", 21);



}
 
Example 11
Source Project: jdk8u_jdk   Source File: DemoMetalTheme.java    License: GNU General Public License v2.0 6 votes vote down vote up
@Override
public void addCustomEntriesToTable(UIDefaults table) {
    super.addCustomEntriesToTable(table);

    final int internalFrameIconSize = 22;
    table.put("InternalFrame.closeIcon", MetalIconFactory.
            getInternalFrameCloseIcon(internalFrameIconSize));
    table.put("InternalFrame.maximizeIcon", MetalIconFactory.
            getInternalFrameMaximizeIcon(internalFrameIconSize));
    table.put("InternalFrame.iconifyIcon", MetalIconFactory.
            getInternalFrameMinimizeIcon(internalFrameIconSize));
    table.put("InternalFrame.minimizeIcon", MetalIconFactory.
            getInternalFrameAltMaximizeIcon(internalFrameIconSize));


    table.put("ScrollBar.width", 21);



}
 
Example 12
Source Project: jdk8u-jdk   Source File: DemoMetalTheme.java    License: GNU General Public License v2.0 6 votes vote down vote up
@Override
public void addCustomEntriesToTable(UIDefaults table) {
    super.addCustomEntriesToTable(table);

    final int internalFrameIconSize = 22;
    table.put("InternalFrame.closeIcon", MetalIconFactory.
            getInternalFrameCloseIcon(internalFrameIconSize));
    table.put("InternalFrame.maximizeIcon", MetalIconFactory.
            getInternalFrameMaximizeIcon(internalFrameIconSize));
    table.put("InternalFrame.iconifyIcon", MetalIconFactory.
            getInternalFrameMinimizeIcon(internalFrameIconSize));
    table.put("InternalFrame.minimizeIcon", MetalIconFactory.
            getInternalFrameAltMaximizeIcon(internalFrameIconSize));


    table.put("ScrollBar.width", 21);



}
 
Example 13
Source Project: jdk8u-dev-jdk   Source File: DemoMetalTheme.java    License: GNU General Public License v2.0 6 votes vote down vote up
@Override
public void addCustomEntriesToTable(UIDefaults table) {
    super.addCustomEntriesToTable(table);

    final int internalFrameIconSize = 22;
    table.put("InternalFrame.closeIcon", MetalIconFactory.
            getInternalFrameCloseIcon(internalFrameIconSize));
    table.put("InternalFrame.maximizeIcon", MetalIconFactory.
            getInternalFrameMaximizeIcon(internalFrameIconSize));
    table.put("InternalFrame.iconifyIcon", MetalIconFactory.
            getInternalFrameMinimizeIcon(internalFrameIconSize));
    table.put("InternalFrame.minimizeIcon", MetalIconFactory.
            getInternalFrameAltMaximizeIcon(internalFrameIconSize));


    table.put("ScrollBar.width", 21);



}
 
Example 14
Source Project: editorconfig-netbeans   Source File: Installer.java    License: MIT License 6 votes vote down vote up
/**
 * Displays a notification in the default notification UI containing
 * information on the plugin's incompatibility with the current IDE's version
 * of the JVM
 */
private static void registerIncompatabilityNotification() {

  //These are the title, message and icon displayed in the notification area and within popup if user interacts with notification
  final String incompatTitle = NbBundle.getMessage(Installer.class, "wlc-nbeditorconfig-version-error-title");
  final String incompatMessage = NbBundle.getMessage(Installer.class, "wlc-nbeditorconfig-version-error-message");
  final Icon incompatIcon = new MetalIconFactory.FileIcon16();
  
  INSTALLER_LOGGER.log(Level.SEVERE, incompatMessage);

  final ActionListener notificationInteractionListener = new ActionListener() {
    @Override
    public void actionPerformed(ActionEvent e) {
      NotifyDescriptor.Message pluginIncompatiableMessage = new NotifyDescriptor.Message(incompatMessage, NotifyDescriptor.ERROR_MESSAGE);
      DialogDisplayer.getDefault().notify(pluginIncompatiableMessage);
    }
  };

  NotificationDisplayer.getDefault().notify(incompatTitle, incompatIcon, incompatMessage, notificationInteractionListener);

}
 
Example 15
Source Project: pdfxtk   Source File: TreeViewTest.java    License: Apache License 2.0 6 votes vote down vote up
public void dragGestureRecognized(DragGestureEvent e) {
   Object o = view.locationToObject(e.getComponent(), e.getDragOrigin());
   if(o != null) {
     if(e.getDragSource().isDragImageSupported()) {
if(FILE == null) {
  FILE   = Swing.iconToImage(MetalIconFactory.getTreeLeafIcon());
  FOLDER = Swing.iconToImage(MetalIconFactory.getTreeFolderIcon());
}
BufferedImage image = model.isLeaf(o) ? FILE : FOLDER;
e.startDrag(DragSource.DefaultMoveDrop,
	    image,
	    new Point(image.getWidth() / 2, image.getHeight() / 2),
	    new StringSelection(o.toString()),
	    this);
     } else
e.startDrag(DragSource.DefaultMoveDrop, // cursor
	    new StringSelection(o.toString()), // transferable
	    this); // drag source listener
   }
 }
 
Example 16
Source Project: FidoCadJ   Source File: MacroTreeModel.java    License: GNU General Public License v3.0 5 votes vote down vote up
LibraryNode(Library library)
{
    this.library = library;
    if(library.isStdLib()) {
        icon = MetalIconFactory.getTreeHardDriveIcon();
    } else {
        icon = MetalIconFactory.getTreeFloppyDriveIcon();
    }
}
 
Example 17
Source Project: pdfxtk   Source File: ChooserTreeView.java    License: Apache License 2.0 5 votes vote down vote up
public Component getListCellRendererComponent(JList   list,
					  Object  value,
					  int     index,
					  boolean isSelected,
					  boolean cellHasFocus)
   {
     DefaultListCellRenderer result = 
(DefaultListCellRenderer)super.getListCellRendererComponent(list, value, index, isSelected, cellHasFocus);
     
     result.setIcon(tree.isLeaf(value) ? 
	     MetalIconFactory.getTreeLeafIcon() :
	     MetalIconFactory.getTreeFolderIcon());
     
     return result;
   }
 
Example 18
Source Project: FidoCadJ   Source File: MacroTreeModel.java    License: GNU General Public License v3.0 4 votes vote down vote up
RootNode()
{
    parent = null;
    label = "FidoCadJ";
    icon = MetalIconFactory.getTreeComputerIcon();
}
 
Example 19
Source Project: FidoCadJ   Source File: MacroTreeModel.java    License: GNU General Public License v3.0 4 votes vote down vote up
RootNode(String label)
{
    parent=null;
    this.label=label;
    icon = MetalIconFactory.getTreeComputerIcon();
}