01: /*
02: * FlatButton.java
03: *
04: * This file is part of SQL Workbench/J, http://www.sql-workbench.net
05: *
06: * Copyright 2002-2008, Thomas Kellerer
07: * No part of this code maybe reused without the permission of the author
08: *
09: * To contact the author please send an email to: support@sql-workbench.net
10: *
11: */
12: package workbench.gui.components;
13:
14: import javax.swing.Icon;
15: import workbench.WbManager;
16: import workbench.gui.WbSwingUtilities;
17:
18: /**
19: *
20: * @author support@sql-workbench.net
21: */
22: public class FlatButton extends WbButton {
23:
24: public FlatButton() {
25: super ();
26: init();
27: }
28:
29: public FlatButton(Icon icon) {
30: super (icon);
31: init();
32: }
33:
34: public FlatButton(String label) {
35: super (label);
36: init();
37: }
38:
39: private void init() {
40: if (WbManager.getInstance() == null)
41: return;
42: if (WbManager.getInstance().isWindowsClassic()) {
43: setFlatLook();
44: }
45: }
46:
47: public void setFlatLook() {
48: this.setBorder(WbSwingUtilities.FLAT_BUTTON_BORDER);
49: }
50: }
|