This Bugzilla instance is a read-only archive of historic NetBeans bug reports. To report a bug in NetBeans please follow the project's instructions for reporting issues.

View | Details | Raw Unified | Return to bug 161847
Collapse All | Expand All

(-)a/autoupdate.ui/src/org/netbeans/modules/autoupdate/ui/DetailsPanel.java (-2 / +26 lines)
Lines 61-67 Link Here
61
    private JButton button;
61
    private JButton button;
62
    private JButton button2;
62
    private JButton button2;
63
    private JPanel rightCornerHeader;
63
    private JPanel rightCornerHeader;
64
    private HyperlinkListener hyperlinkListener;
64
    private HyperlinkListener hyperlinkListener;    
65
    private Border defaultBorder;
65
    
66
    
66
    public DetailsPanel() {
67
    public DetailsPanel() {
67
        initComponents2();
68
        initComponents2();
Lines 138-148 Link Here
138
            title.setText("<html><h3>"+value+"</h3></html>"); // NOI18N
139
            title.setText("<html><h3>"+value+"</h3></html>"); // NOI18N
139
        }
140
        }
140
    }
141
    }
142
143
    private void setButtonBorder(JButton b, Action action) {
144
        boolean useDefaultBorder = true;
145
        button.setBorder(defaultBorder);
146
            if(action !=null) {
147
                Object o = action.getValue("highlightColor");
148
                if (o!=null && o instanceof Color) {
149
                    int height = (header.getMinimumSize().height - button.getMinimumSize().height) / 2 - 3;
150
                    int width = 8;
151
                    Border highlightBorderO = BorderFactory.createCompoundBorder(BorderFactory.createMatteBorder(height, width, height, width, new Color(98,162,82)),
152
                            BorderFactory.createEmptyBorder(0, 3, 0, 3));
153
                    Border highlightBorder  = BorderFactory.createCompoundBorder(highlightBorderO, button.getBorder());
154
155
                    button.setBorder(highlightBorder);
156
                    useDefaultBorder = false;
157
                }
158
            }
159
       if(useDefaultBorder) {
160
           button.setBorder(defaultBorder);
161
       }
162
    }
141
    public void setActionListener(Action action) {
163
    public void setActionListener(Action action) {
142
        button.setVisible(action != null);
164
        button.setVisible(action != null);
143
        button.setEnabled(action != null);
165
        button.setEnabled(action != null);
144
        if (action != null) {
166
        if (action != null) {
145
            button.setAction(action);
167
            button.setAction(action);
168
            setButtonBorder(button, action);
146
            button.getAccessibleContext ().setAccessibleDescription (
169
            button.getAccessibleContext ().setAccessibleDescription (
147
                    NbBundle.getMessage (DetailsPanel.class, "ACN_DetailsPanel_Button", button.getName ())); // NOI18N
170
                    NbBundle.getMessage (DetailsPanel.class, "ACN_DetailsPanel_Button", button.getName ())); // NOI18N
148
        }
171
        }
Lines 153-163 Link Here
153
        button2.setEnabled(action != null);
176
        button2.setEnabled(action != null);
154
        if (action != null) {
177
        if (action != null) {
155
            button2.setAction(action);
178
            button2.setAction(action);
179
            setButtonBorder(button2, action);
156
            button2.getAccessibleContext ().setAccessibleDescription (
180
            button2.getAccessibleContext ().setAccessibleDescription (
157
                    NbBundle.getMessage (DetailsPanel.class, "ACN_DetailsPanel_Button", button2.getName ())); // NOI18N
181
                    NbBundle.getMessage (DetailsPanel.class, "ACN_DetailsPanel_Button", button2.getName ())); // NOI18N
158
        }
182
        }
159
    }
183
    }
160
    
161
184
162
    @Override
185
    @Override
163
    public void setEnabled(boolean enabled) {
186
    public void setEnabled(boolean enabled) {
Lines 191-196 Link Here
191
        CompoundBorder compoundBorder = BorderFactory.createCompoundBorder(outsideBorder, insideBorder);
214
        CompoundBorder compoundBorder = BorderFactory.createCompoundBorder(outsideBorder, insideBorder);
192
        header.setBorder(compoundBorder);
215
        header.setBorder(compoundBorder);
193
        button.setVisible(false);
216
        button.setVisible(false);
217
        defaultBorder = button.getBorder();
194
        button2.setVisible(false);        
218
        button2.setVisible(false);        
195
        rightCornerHeader  = new JPanel();        
219
        rightCornerHeader  = new JPanel();        
196
        rightCornerHeader.setBorder(compoundBorder);
220
        rightCornerHeader.setBorder(compoundBorder);
(-)a/autoupdate.ui/src/org/netbeans/modules/autoupdate/ui/UnitTab.java (+2 lines)
Lines 41-46 Link Here
41
41
42
package org.netbeans.modules.autoupdate.ui;
42
package org.netbeans.modules.autoupdate.ui;
43
43
44
import java.awt.Color;
44
import org.netbeans.modules.autoupdate.ui.wizards.UninstallUnitWizard;
45
import org.netbeans.modules.autoupdate.ui.wizards.UninstallUnitWizard;
45
import org.netbeans.modules.autoupdate.ui.wizards.InstallUnitWizard;
46
import org.netbeans.modules.autoupdate.ui.wizards.InstallUnitWizard;
46
import java.awt.Component;
47
import java.awt.Component;
Lines 1270-1275 Link Here
1270
    private class ActivateAction extends RowTabAction {
1271
    private class ActivateAction extends RowTabAction {
1271
        public ActivateAction () {
1272
        public ActivateAction () {
1272
            super ("UnitTab_ActivateAction", /*KeyStroke.getKeyStroke (KeyEvent.VK_E, KeyEvent.CTRL_DOWN_MASK),*/ "EnableDisable");
1273
            super ("UnitTab_ActivateAction", /*KeyStroke.getKeyStroke (KeyEvent.VK_E, KeyEvent.CTRL_DOWN_MASK),*/ "EnableDisable");
1274
            putValue("highlightColor", new Color(98,162,82));
1273
        }
1275
        }
1274
        
1276
        
1275
        protected boolean isEnabled (Unit u) {
1277
        protected boolean isEnabled (Unit u) {

Return to bug 161847