Search in sources :

Example 81 with CardLayout

use of java.awt.CardLayout in project processdash by dtuma.

the class PercentSpentIndicator method buildUI.

private void buildUI() {
    layout = new CardLayout();
    setLayout(layout);
    levelIndicator = new LevelIndicator(true);
    levelIndicator.setPaintBarRect(false);
    add(levelIndicator, LEVEL_INDICATOR_KEY);
    Icon hourglassIcon = DashboardIconFactory.getHourglassIcon();
    JLabel label = new JLabel(hourglassIcon);
    add(label, MISSING_ESTIMATE_KEY);
    if (!Settings.isReadOnly()) {
        addMouseListener(new MouseAdapter() {

            public void mousePressed(MouseEvent e) {
                showEditEstimateDialog();
            }
        });
    }
    setBorder(BorderFactory.createLineBorder(UIManager.getColor("controlDkShadow")));
    Dimension d = new Dimension(hourglassIcon.getIconWidth() + 4, hourglassIcon.getIconHeight() + 6);
    setMinimumSize(d);
    setPreferredSize(d);
    new ToolTipTimingCustomizer(750, 60000).install(this);
}
Also used : CardLayout(java.awt.CardLayout) MouseEvent(java.awt.event.MouseEvent) ToolTipTimingCustomizer(net.sourceforge.processdash.ui.lib.ToolTipTimingCustomizer) LevelIndicator(net.sourceforge.processdash.ui.lib.LevelIndicator) MouseAdapter(java.awt.event.MouseAdapter) JLabel(javax.swing.JLabel) Icon(javax.swing.Icon) Dimension(java.awt.Dimension)

Aggregations

CardLayout (java.awt.CardLayout)81 JPanel (javax.swing.JPanel)29 JLabel (javax.swing.JLabel)12 BorderLayout (java.awt.BorderLayout)10 JScrollPane (javax.swing.JScrollPane)9 GridBagLayout (java.awt.GridBagLayout)7 Dimension (java.awt.Dimension)6 Insets (java.awt.Insets)6 ImageIcon (javax.swing.ImageIcon)6 ListSelectionEvent (javax.swing.event.ListSelectionEvent)5 Font (java.awt.Font)4 Point (java.awt.Point)4 JButton (javax.swing.JButton)4 AWTException (java.awt.AWTException)3 FlowLayout (java.awt.FlowLayout)3 EmptyBorder (javax.swing.border.EmptyBorder)3 ListSelectionListener (javax.swing.event.ListSelectionListener)3 Account (com.moneychanger.core.Account)2 OpenTransactionAccount (com.moneychanger.core.OpenTransactionAccount)2 RippleAccount (com.moneychanger.core.RippleAccount)2