summaryrefslogtreecommitdiff
path: root/trunk/pdf-over-gui/src
diff options
context:
space:
mode:
authortkellner <tkellner@3a0b52a2-8410-0410-bc02-ff6273a87459>2012-10-31 16:36:27 +0000
committertkellner <tkellner@3a0b52a2-8410-0410-bc02-ff6273a87459>2012-10-31 16:36:27 +0000
commitd9ada34a34f9c0f3872e2690d624d1f897d162e3 (patch)
treea4faf193fa3cb6ce8a1422a06886a281e2bd51a0 /trunk/pdf-over-gui/src
parent6e24afc6d35f979196723f8f1fbc5d524d7def11 (diff)
downloadpdf-over-d9ada34a34f9c0f3872e2690d624d1f897d162e3.tar.gz
pdf-over-d9ada34a34f9c0f3872e2690d624d1f897d162e3.tar.bz2
pdf-over-d9ada34a34f9c0f3872e2690d624d1f897d162e3.zip
+ add dashed border to config emblem drop
git-svn-id: https://svn.iaik.tugraz.at/svn/egiz/prj/current/12PDF-OVER-4.0@12677 3a0b52a2-8410-0410-bc02-ff6273a87459
Diffstat (limited to 'trunk/pdf-over-gui/src')
-rw-r--r--trunk/pdf-over-gui/src/main/java/at/asit/pdfover/gui/composites/SimpleConfigurationComposite.java22
1 files changed, 20 insertions, 2 deletions
diff --git a/trunk/pdf-over-gui/src/main/java/at/asit/pdfover/gui/composites/SimpleConfigurationComposite.java b/trunk/pdf-over-gui/src/main/java/at/asit/pdfover/gui/composites/SimpleConfigurationComposite.java
index 07a0da53..9bc75be5 100644
--- a/trunk/pdf-over-gui/src/main/java/at/asit/pdfover/gui/composites/SimpleConfigurationComposite.java
+++ b/trunk/pdf-over-gui/src/main/java/at/asit/pdfover/gui/composites/SimpleConfigurationComposite.java
@@ -27,15 +27,19 @@ import org.eclipse.swt.dnd.FileTransfer;
import org.eclipse.swt.dnd.Transfer;
import org.eclipse.swt.events.FocusAdapter;
import org.eclipse.swt.events.FocusEvent;
+import org.eclipse.swt.events.PaintEvent;
+import org.eclipse.swt.events.PaintListener;
import org.eclipse.swt.events.SelectionAdapter;
import org.eclipse.swt.events.SelectionEvent;
import org.eclipse.swt.events.TraverseEvent;
import org.eclipse.swt.events.TraverseListener;
+import org.eclipse.swt.graphics.Color;
import org.eclipse.swt.graphics.Font;
import org.eclipse.swt.graphics.FontData;
import org.eclipse.swt.graphics.Image;
import org.eclipse.swt.graphics.ImageData;
import org.eclipse.swt.graphics.Point;
+import org.eclipse.swt.graphics.Rectangle;
import org.eclipse.swt.layout.FormAttachment;
import org.eclipse.swt.layout.FormData;
import org.eclipse.swt.layout.FormLayout;
@@ -101,7 +105,7 @@ public class SimpleConfigurationComposite extends BaseConfigurationComposite {
}
}
- private Label lblEmblem;
+ Label lblEmblem;
private Text txtProxyHost;
Text txtProxyPort;
Text txtMobileNumber;
@@ -433,7 +437,7 @@ public class SimpleConfigurationComposite extends BaseConfigurationComposite {
new Label(grpBildmarke, SWT.NONE);
new Label(grpBildmarke, SWT.NONE);
- this.lblEmblem = new Label(grpBildmarke, SWT.BORDER | SWT.RESIZE);
+ this.lblEmblem = new Label(grpBildmarke, SWT.RESIZE);
this.lblEmblem.setLayoutData(new GridData(SWT.FILL, SWT.FILL, true,
true, 3, 1));
this.lblEmblem.setAlignment(SWT.CENTER);
@@ -446,6 +450,20 @@ public class SimpleConfigurationComposite extends BaseConfigurationComposite {
SimpleConfigurationComposite.this.recalculateEmblemSize();
}
});
+
+ this.lblEmblem.addPaintListener(new PaintListener() {
+
+ @Override
+ public void paintControl(PaintEvent e) {
+ //e.gc.setForeground();
+ e.gc.setForeground(new Color(getDisplay(),0x6B, 0xA5, 0xD9));
+ e.gc.setLineWidth(3);
+ e.gc.setLineStyle(SWT.LINE_DASH);
+ e.gc.drawRoundRectangle(e.x,
+ e.y, e.width - 2, e.height - 2,
+ 10, 10);
+ }
+ });
FontData[] fD_lblEmblem = this.lblEmblem.getFont().getFontData();
fD_lblEmblem[0].setHeight(TEXT_SIZE_NORMAL);