diff options
author | tkellner <tkellner@174cde9d-5d70-4d2a-aa98-46368bc2aaf7> | 2013-04-10 19:08:50 +0000 |
---|---|---|
committer | tkellner <tkellner@174cde9d-5d70-4d2a-aa98-46368bc2aaf7> | 2013-04-10 19:08:50 +0000 |
commit | 31c595076c0574bd3f084c68fcd2f9a7ac163477 (patch) | |
tree | 5b3cdd263b9c988ebc384c2162376aeee644900e /pdf-over-gui/src/main/java/at/asit/pdfover/gui/controls/MainBarButton.java | |
parent | c9c5ab74fb8e71b840d4c1584f437fa42d3aea3a (diff) | |
download | pdf-over-31c595076c0574bd3f084c68fcd2f9a7ac163477.tar.gz pdf-over-31c595076c0574bd3f084c68fcd2f9a7ac163477.tar.bz2 pdf-over-31c595076c0574bd3f084c68fcd2f9a7ac163477.zip |
Move constants to separate class
git-svn-id: https://joinup.ec.europa.eu/svn/pdf-over/trunk@157 174cde9d-5d70-4d2a-aa98-46368bc2aaf7
Diffstat (limited to 'pdf-over-gui/src/main/java/at/asit/pdfover/gui/controls/MainBarButton.java')
-rw-r--r-- | pdf-over-gui/src/main/java/at/asit/pdfover/gui/controls/MainBarButton.java | 74 |
1 files changed, 32 insertions, 42 deletions
diff --git a/pdf-over-gui/src/main/java/at/asit/pdfover/gui/controls/MainBarButton.java b/pdf-over-gui/src/main/java/at/asit/pdfover/gui/controls/MainBarButton.java index 5c7af927..531937b4 100644 --- a/pdf-over-gui/src/main/java/at/asit/pdfover/gui/controls/MainBarButton.java +++ b/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 |