Search in sources :

Example 1 with IconButton

use of replete.gui.controls.IconButton in project n2a by frothga.

the class HelpLabels method createHelpIcon.

public static JButton createHelpIcon(final HelpCapableWindow win, final String helpKey) {
    IconButton btnHelp = new IconButton(ImageUtil.getImage("help3.gif"), "Show Help");
    btnHelp.setFocusable(false);
    btnHelp.toImageOnly();
    btnHelp.addActionListener(new ActionListener() {

        public void actionPerformed(ActionEvent e) {
            showHelp(win, helpKey);
        }
    });
    return btnHelp;
}
Also used : IconButton(replete.gui.controls.IconButton) ActionListener(java.awt.event.ActionListener) ActionEvent(java.awt.event.ActionEvent)

Example 2 with IconButton

use of replete.gui.controls.IconButton in project n2a by frothga.

the class RoundedPanel method main.

public static void main(String[] args) {
    JFrame f = new EscapeFrame();
    RoundedPanel r;
    r = new RoundedPanel();
    // r.setLayout(new BorderLayout());
    // r.add(new JLabel("asdfasf"), BorderLayout.NORTH);
    // r.add(new JButton("afds"), BorderLayout.CENTER);
    Lay.BLtg(r, "N", Lay.BL("C", Lay.GL(2, 1, Lay.lb("Group #"), new JComboBox(new Object[] { "Mixed", "Latin Hypercube", "Monte Carlo" }), "opaque=false"), "E", Lay.BL("C", Lay.BL("W", Lay.lb("#"), "C", new JTextField(10)), "E", new IconButton(ImageUtil.getImage("cancel.gif"), "remove group!"), "opaque=false"), "bg=yellow,eb=10,opaque=false"), "C", Lay.BxL("Y", Lay.lb("adfasdf" + " Const(" + 3333 + ")"), "eb=10,opaque=false"));
    Lay.BLtg(f, "C", r, "size=[500,500],center=2,visible");
}
Also used : EscapeFrame(replete.gui.windows.EscapeFrame) JComboBox(javax.swing.JComboBox) IconButton(replete.gui.controls.IconButton) JFrame(javax.swing.JFrame) JTextField(javax.swing.JTextField)

Example 3 with IconButton

use of replete.gui.controls.IconButton in project n2a by frothga.

the class HelpLabels method createLabelPanel.

public static JPanel createLabelPanel(final HelpCapableWindow win, String text, final String helpKey, Icon prefix) {
    IconButton btnHelp = new IconButton(ImageUtil.getImage("help3.gif"), "Show Help");
    btnHelp.setFocusable(false);
    btnHelp.toImageOnly();
    btnHelp.addActionListener(new ActionListener() {

        public void actionPerformed(ActionEvent e) {
            showHelp(win, helpKey);
        }
    });
    return Lay.BL("W", Lay.BL("C", Lay.lb(text + ":", prefix, "opaque=false"), "E", Lay.p(btnHelp, "eb=2l,opaque=false"), "opaque=false"), "C", Lay.p("opaque=false"), "opaque=false");
}
Also used : IconButton(replete.gui.controls.IconButton) ActionListener(java.awt.event.ActionListener) ActionEvent(java.awt.event.ActionEvent)

Aggregations

IconButton (replete.gui.controls.IconButton)3 ActionEvent (java.awt.event.ActionEvent)2 ActionListener (java.awt.event.ActionListener)2 JComboBox (javax.swing.JComboBox)1 JFrame (javax.swing.JFrame)1 JTextField (javax.swing.JTextField)1 EscapeFrame (replete.gui.windows.EscapeFrame)1