Search in sources :

Example 1 with LevelIndicator

use of net.sourceforge.processdash.ui.lib.LevelIndicator 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)1 Dimension (java.awt.Dimension)1 MouseAdapter (java.awt.event.MouseAdapter)1 MouseEvent (java.awt.event.MouseEvent)1 Icon (javax.swing.Icon)1 JLabel (javax.swing.JLabel)1 LevelIndicator (net.sourceforge.processdash.ui.lib.LevelIndicator)1 ToolTipTimingCustomizer (net.sourceforge.processdash.ui.lib.ToolTipTimingCustomizer)1