summaryrefslogtreecommitdiff
path: root/trunk/pdf-over-gui/src/main/java/at/asit/pdfover/gui/controls/ErrorMarker.java
diff options
context:
space:
mode:
authortkellner <tkellner@3a0b52a2-8410-0410-bc02-ff6273a87459>2012-10-01 08:30:40 +0000
committertkellner <tkellner@3a0b52a2-8410-0410-bc02-ff6273a87459>2012-10-01 08:30:40 +0000
commit6d81b2dfa1a2ddb9192b864cc8f4585469bddadd (patch)
tree7f46021998069899e510766fa81dcc1b41c0c262 /trunk/pdf-over-gui/src/main/java/at/asit/pdfover/gui/controls/ErrorMarker.java
parentde9cabd09b90c701a2c41ce761ac199c5a4a20a6 (diff)
downloadpdf-over-6d81b2dfa1a2ddb9192b864cc8f4585469bddadd.tar.gz
pdf-over-6d81b2dfa1a2ddb9192b864cc8f4585469bddadd.tar.bz2
pdf-over-6d81b2dfa1a2ddb9192b864cc8f4585469bddadd.zip
Configuration and Main Bar Buttons
git-svn-id: https://svn.iaik.tugraz.at/svn/egiz/prj/current/12PDF-OVER-4.0@12534 3a0b52a2-8410-0410-bc02-ff6273a87459
Diffstat (limited to 'trunk/pdf-over-gui/src/main/java/at/asit/pdfover/gui/controls/ErrorMarker.java')
-rw-r--r--trunk/pdf-over-gui/src/main/java/at/asit/pdfover/gui/controls/ErrorMarker.java26
1 files changed, 22 insertions, 4 deletions
diff --git a/trunk/pdf-over-gui/src/main/java/at/asit/pdfover/gui/controls/ErrorMarker.java b/trunk/pdf-over-gui/src/main/java/at/asit/pdfover/gui/controls/ErrorMarker.java
index 11cefa13..01505895 100644
--- a/trunk/pdf-over-gui/src/main/java/at/asit/pdfover/gui/controls/ErrorMarker.java
+++ b/trunk/pdf-over-gui/src/main/java/at/asit/pdfover/gui/controls/ErrorMarker.java
@@ -18,13 +18,9 @@ package at.asit.pdfover.gui.controls;
// Imports
import java.io.InputStream;
-import org.eclipse.swt.events.PaintEvent;
-import org.eclipse.swt.events.PaintListener;
-import org.eclipse.swt.graphics.GC;
import org.eclipse.swt.graphics.Image;
import org.eclipse.swt.graphics.ImageData;
import org.eclipse.swt.graphics.Point;
-import org.eclipse.swt.widgets.Canvas;
import org.eclipse.swt.widgets.Composite;
import org.eclipse.swt.widgets.Control;
import org.eclipse.swt.widgets.Label;
@@ -39,6 +35,7 @@ public class ErrorMarker {
/**
* SLF4J Logger instance
**/
+ @SuppressWarnings("unused")
private static final Logger log = LoggerFactory
.getLogger(ErrorMarker.class);
@@ -49,6 +46,7 @@ public class ErrorMarker {
* @param style
* @param exception
* @param message
+ * @param control
*/
public ErrorMarker(Composite parent, int style, Throwable exception,
String message, Control control) {
@@ -74,19 +72,35 @@ public class ErrorMarker {
this.lbl.setImage(this.orig);
}
+ /**
+ * Sets the layout data
+ * @param object the layout data
+ */
public void setLayoutData(Object object) {
this.lbl.setLayoutData(object);
}
+ /**
+ * Sets the visibilty
+ * @param visible the visibilty
+ */
public void setVisible(boolean visible) {
this.lbl.setVisible(visible);
}
+ /**
+ * Sets the tooltip text
+ * @param msg the tooltip text
+ */
public void setToolTipText(String msg) {
this.lbl.setToolTipText(msg);
}
+ /**
+ * Scales the image to the new size
+ * @param size
+ */
public void resize(Point size) {
String imgPath = "/img/error.png"; //$NON-NLS-1$
@@ -101,6 +115,10 @@ public class ErrorMarker {
this.lbl.setImage(this.orig);
}
+ /**
+ * Gets the size of the underlying label
+ * @return the size
+ */
public Point getSize() {
return this.lbl.getSize();
}