diff options
author | tkellner <tkellner@3a0b52a2-8410-0410-bc02-ff6273a87459> | 2012-10-31 16:36:55 +0000 |
---|---|---|
committer | tkellner <tkellner@3a0b52a2-8410-0410-bc02-ff6273a87459> | 2012-10-31 16:36:55 +0000 |
commit | 2981345a1efccd0ee0a1b74f986161ea2c4b881b (patch) | |
tree | 772bf079195a0b5a8918b2197f03371c0d78001e /trunk/pdf-over-gui/src/main/java/at/asit/pdfover/gui/controls | |
parent | 0d8f4da43d19ea8e0fb520c5c5d29caa51707251 (diff) | |
download | pdf-over-2981345a1efccd0ee0a1b74f986161ea2c4b881b.tar.gz pdf-over-2981345a1efccd0ee0a1b74f986161ea2c4b881b.tar.bz2 pdf-over-2981345a1efccd0ee0a1b74f986161ea2c4b881b.zip |
Move constants to separate class
git-svn-id: https://svn.iaik.tugraz.at/svn/egiz/prj/current/12PDF-OVER-4.0@12743 3a0b52a2-8410-0410-bc02-ff6273a87459
Diffstat (limited to 'trunk/pdf-over-gui/src/main/java/at/asit/pdfover/gui/controls')
-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 |