diff options
Diffstat (limited to 'trunk/pdf-over-gui/src/main/java/at/asit/pdfover/gui/controls/MainBarButton.java')
-rw-r--r-- | trunk/pdf-over-gui/src/main/java/at/asit/pdfover/gui/controls/MainBarButton.java | 74 |
1 files changed, 32 insertions, 42 deletions
diff --git a/trunk/pdf-over-gui/src/main/java/at/asit/pdfover/gui/controls/MainBarButton.java b/trunk/pdf-over-gui/src/main/java/at/asit/pdfover/gui/controls/MainBarButton.java index 5c7af927..531937b4 100644 --- a/trunk/pdf-over-gui/src/main/java/at/asit/pdfover/gui/controls/MainBarButton.java +++ b/trunk/pdf-over-gui/src/main/java/at/asit/pdfover/gui/controls/MainBarButton.java @@ -29,10 +29,8 @@ import org.eclipse.swt.widgets.Canvas; import org.eclipse.swt.widgets.Composite; import org.eclipse.swt.widgets.Event; import org.eclipse.swt.widgets.Listener; -import org.slf4j.Logger; -import org.slf4j.LoggerFactory; -import at.asit.pdfover.gui.composites.StateComposite; +import at.asit.pdfover.gui.Constants; /** * Main Bar Button implementation @@ -50,7 +48,31 @@ public abstract class MainBarButton extends Canvas { * This should be a multiple of 2! */ public static final int SplitFactor = 10; - + + /** + * the used text color + */ + protected Color textColor = null; + + /** + * the text size + */ + protected int textsize = Constants.TEXT_SIZE_BUTTON; + + private Color inactiveBackground = null; + private Color activeBackground1 = null; + private Color borderColor = null; + private Color activeBackground = null; + + private Color inactiveText = null; + + private String text = ""; //$NON-NLS-1$ + + private boolean active = true; + + private Image image = null; + + /** * @param parent * @param style @@ -80,21 +102,18 @@ public abstract class MainBarButton extends Canvas { this.setCursor(hand); - this.inactiveBackground = new Color(getDisplay(),0xD4, 0xE7, 0xF1); - this.activeBackground1 = new Color(getDisplay(),0x6B, 0xA5, 0xD9); - this.activeBackground = new Color(getDisplay(),0xB4, 0xCD, 0xEC); + this.inactiveBackground = Constants.MAINBAR_INACTIVE_BACK; + this.activeBackground1 = Constants.MAINBAR_ACTIVE_BACK_LIGHT; + this.activeBackground = Constants.MAINBAR_ACTIVE_BACK_DARK; //this.textColor = this.getForeground(); - this.textColor = new Color(getDisplay(), 0x00, 0x00, 0x00); + this.textColor = Constants.MAINBAR_ACTIVE_TEXTCOLOR; //this.borderColor = new Color(getDisplay(), 0xf9, 0xf9, 0xf9); this.borderColor = this.getBackground(); - this.inactiveText = new Color(getDisplay(), 0x40, 0x40, 0x40); - this.textsize = StateComposite.TEXT_SIZE_BUTTON; + this.inactiveText = Constants.MAINBAR_INACTIVE_TEXTCOLOR; + this.textsize = Constants.TEXT_SIZE_BUTTON; } - private Color inactiveBackground = null; - private Color activeBackground1 = null; - /** * @param inactiveBackground * the inactiveBackground to set @@ -112,11 +131,6 @@ public abstract class MainBarButton extends Canvas { } /** - * the text size - */ - protected int textsize = StateComposite.TEXT_SIZE_BUTTON; - - /** * @return the textsize */ public int getTextsize() { @@ -132,11 +146,6 @@ public abstract class MainBarButton extends Canvas { } /** - * the used text color - */ - protected Color textColor = null; - - /** * @param textColor * the textColor to set */ @@ -160,18 +169,6 @@ public abstract class MainBarButton extends Canvas { } - private Color borderColor = null; - - private Color activeBackground = null; - - private Color inactiveText = null; - - private String text = ""; //$NON-NLS-1$ - - private boolean active = true; - - private Image image = null; - /** * Gets the image * @@ -236,13 +233,6 @@ public abstract class MainBarButton extends Canvas { } /** - * SLF4J Logger instance - **/ - @SuppressWarnings("unused") - private static final Logger log = LoggerFactory - .getLogger(MainBarButton.class); - - /** * Paint 3D style borders * * @param e |