Search in sources :

Example 11 with ImageIcon

use of javax.swing.ImageIcon in project binnavi by google.

the class CWindowFunctions method showAboutDialog.

/**
   * Shows the BinNavi About dialog.
   *
   * @param parent Parent window used for dialogs.
   */
public static void showAboutDialog(final JFrame parent) {
    try {
        final List<Pair<String, URL>> urls = new ArrayList<>();
        urls.add(new Pair<>("zynamics Website", new URL("http://www.zynamics.com")));
        urls.add(new Pair<>("BinNavi Product Site", new URL("http://www.zynamics.com/binnavi.html")));
        urls.add(new Pair<>("Report Bugs", new URL("mailto:zynamics-support@google.com")));
        final String message = Constants.PROJECT_NAME_VERSION_BUILD + "\n\nCopyright ©2004-2011 zynamics GmbH.\nCopyright ©2011-2016 Google Inc.\n";
        final String description = "\nParts of this software were created by third parties and have different licensing " + "requirements.\nPlease see the manual file for a complete list.\n";
        final Image appImage = new ImageIcon(CMain.class.getResource("data/binnavi_logo3_border.png")).getImage();
        final CDialogAboutEx dlg = new CDialogAboutEx(parent, new ImageIcon(appImage), Constants.PROJECT_NAME_VERSION, message, description, urls);
        GuiHelper.centerOnScreen(dlg);
        dlg.setVisible(true);
    } catch (final Exception e) {
        CUtilityFunctions.logException(e);
    }
}
Also used : ImageIcon(javax.swing.ImageIcon) CDialogAboutEx(com.google.security.zynamics.zylib.gui.CDialogAboutEx) ArrayList(java.util.ArrayList) Image(java.awt.Image) URL(java.net.URL) Pair(com.google.security.zynamics.zylib.general.Pair)

Example 12 with ImageIcon

use of javax.swing.ImageIcon in project android-classyshark by google.

the class Toolbar method buildLeftPanelToggleButton.

private JToggleButton buildLeftPanelToggleButton() {
    final ImageIcon toggleIcon = theme.getToggleIcon();
    final JToggleButton jToggleButton = new JToggleButton(toggleIcon, true);
    jToggleButton.setToolTipText("Show/hide navigation tree");
    jToggleButton.setBorderPainted(false);
    jToggleButton.addActionListener(new ActionListener() {

        @Override
        public void actionPerformed(ActionEvent e) {
            toolbarController.onChangeLeftPaneVisibility(jToggleButton.isSelected());
        }
    });
    return jToggleButton;
}
Also used : ImageIcon(javax.swing.ImageIcon) JToggleButton(javax.swing.JToggleButton) ActionListener(java.awt.event.ActionListener) ActionEvent(java.awt.event.ActionEvent)

Example 13 with ImageIcon

use of javax.swing.ImageIcon in project gephi by gephi.

the class ShortestPath method getUI.

@Override
public ToolUI getUI() {
    return new ToolUI() {

        @Override
        public JPanel getPropertiesBar(Tool tool) {
            shortestPathPanel = new ShortestPathPanel();
            shortestPathPanel.setColor(color);
            shortestPathPanel.setStatus(NbBundle.getMessage(ShortestPath.class, "ShortestPath.status1"));
            return shortestPathPanel;
        }

        @Override
        public String getName() {
            return NbBundle.getMessage(ShortestPath.class, "ShortestPath.name");
        }

        @Override
        public Icon getIcon() {
            return new ImageIcon(getClass().getResource("/org/gephi/tools/plugin/resources/shortestpath.png"));
        }

        @Override
        public String getDescription() {
            return NbBundle.getMessage(ShortestPath.class, "ShortestPath.description");
        }

        @Override
        public int getPosition() {
            return 140;
        }
    };
}
Also used : ImageIcon(javax.swing.ImageIcon) ToolUI(org.gephi.tools.spi.ToolUI) ShortestPathPanel(org.gephi.ui.tools.plugin.ShortestPathPanel) Tool(org.gephi.tools.spi.Tool)

Example 14 with ImageIcon

use of javax.swing.ImageIcon in project gephi by gephi.

the class Brush method getUI.

@Override
public ToolUI getUI() {
    return new ToolUI() {

        @Override
        public JPanel getPropertiesBar(Tool tool) {
            brushPanel = new BrushPanel();
            brushPanel.setDiffusionMethod(diffusionMethod);
            brushPanel.setColor(new Color(color[0], color[1], color[2]));
            brushPanel.setIntensity(intensity);
            return brushPanel;
        }

        @Override
        public String getName() {
            return NbBundle.getMessage(Brush.class, "Brush.name");
        }

        @Override
        public Icon getIcon() {
            return new ImageIcon(getClass().getResource("/org/gephi/tools/plugin/resources/brush.png"));
        }

        @Override
        public String getDescription() {
            return NbBundle.getMessage(Painter.class, "Brush.description");
        }

        @Override
        public int getPosition() {
            return 110;
        }
    };
}
Also used : BrushPanel(org.gephi.ui.tools.plugin.BrushPanel) ImageIcon(javax.swing.ImageIcon) Color(java.awt.Color) ToolUI(org.gephi.tools.spi.ToolUI) Tool(org.gephi.tools.spi.Tool)

Example 15 with ImageIcon

use of javax.swing.ImageIcon in project gephi by gephi.

the class CloseButton method init.

private void init() {
    if (UIUtils.isGTKLookAndFeel()) {
        setIcon(new ImageIcon(getClass().getResource("/org/gephi/ui/components/resources/gtk_bigclose_enabled.png")));
        setRolloverIcon(new ImageIcon(getClass().getResource("/org/gephi/ui/components/resources/gtk_bigclose_rollover.png")));
        setPressedIcon(new ImageIcon(getClass().getResource("/org/gephi/ui/components/resources/gtk_bigclose_pressed.png")));
    } else if (UIUtils.isWindowsClassicLookAndFeel()) {
        setIcon(new ImageIcon(getClass().getResource("/org/gephi/ui/components/resources/win_bigclose_enabled.png")));
        setRolloverIcon(new ImageIcon(getClass().getResource("/org/gephi/ui/components/resources/win_bigclose_rollover.png")));
        setPressedIcon(new ImageIcon(getClass().getResource("/org/gephi/ui/components/resources/win_bigclose_pressed.png")));
    } else if (UIUtils.isWindowsXPLookAndFeel()) {
        setIcon(new ImageIcon(getClass().getResource("/org/gephi/ui/components/resources/xp_bigclose_enabled.png")));
        setRolloverIcon(new ImageIcon(getClass().getResource("/org/gephi/ui/components/resources/xp_bigclose_rollover.png")));
        setPressedIcon(new ImageIcon(getClass().getResource("/org/gephi/ui/components/resources/xp_bigclose_pressed.png")));
    } else if (UIUtils.isWindowsVistaLookAndFeel()) {
        setIcon(new ImageIcon(getClass().getResource("/org/gephi/ui/components/resources/vista_bigclose_enabled.png")));
        setRolloverIcon(new ImageIcon(getClass().getResource("/org/gephi/ui/components/resources/vista_bigclose_rollover.png")));
        setPressedIcon(new ImageIcon(getClass().getResource("/org/gephi/ui/components/resources/vista_bigclose_pressed.png")));
    } else if (UIUtils.isAquaLookAndFeel()) {
        setIcon(new ImageIcon(getClass().getResource("/org/gephi/ui/components/resources/mac_bigclose_enabled.png")));
        setRolloverIcon(new ImageIcon(getClass().getResource("/org/gephi/ui/components/resources/mac_bigclose_rollover.png")));
        setPressedIcon(new ImageIcon(getClass().getResource("/org/gephi/ui/components/resources/mac_bigclose_pressed.png")));
    }
    setText("");
    setBorder(javax.swing.BorderFactory.createEmptyBorder());
    setBorderPainted(false);
    setContentAreaFilled(false);
    setFocusable(false);
    setOpaque(false);
}
Also used : ImageIcon(javax.swing.ImageIcon)

Aggregations

ImageIcon (javax.swing.ImageIcon)427 JButton (javax.swing.JButton)109 ActionEvent (java.awt.event.ActionEvent)83 ActionListener (java.awt.event.ActionListener)70 JLabel (javax.swing.JLabel)67 Dimension (java.awt.Dimension)62 BufferedImage (java.awt.image.BufferedImage)51 JPanel (javax.swing.JPanel)48 Insets (java.awt.Insets)42 Image (java.awt.Image)31 BorderLayout (java.awt.BorderLayout)28 IOException (java.io.IOException)28 URL (java.net.URL)26 GridBagLayout (java.awt.GridBagLayout)23 JMenuItem (javax.swing.JMenuItem)23 Color (java.awt.Color)21 Point (java.awt.Point)21 LogTypeHelper (com.cosylab.logging.engine.log.LogTypeHelper)20 JToggleButton (javax.swing.JToggleButton)20 JScrollPane (javax.swing.JScrollPane)19