summaryrefslogtreecommitdiff
path: root/java/gjt/EtchedBorder.java
diff options
context:
space:
mode:
authorpjain <pjain@ae88bc3d-4319-0410-8dbf-d08b4c9d3795>1997-04-07 18:12:58 +0000
committerpjain <pjain@ae88bc3d-4319-0410-8dbf-d08b4c9d3795>1997-04-07 18:12:58 +0000
commit193064fe76af85d8963bba3f1e91b873d955c6d8 (patch)
treeba4b0a7a26bf46ea298496a434496695db55bdc1 /java/gjt/EtchedBorder.java
parent40e0a419db16f5c42865615794fdcf5d76329726 (diff)
downloadATCD-193064fe76af85d8963bba3f1e91b873d955c6d8.tar.gz
Added gjt to CVS
Diffstat (limited to 'java/gjt/EtchedBorder.java')
-rw-r--r--java/gjt/EtchedBorder.java59
1 files changed, 59 insertions, 0 deletions
diff --git a/java/gjt/EtchedBorder.java b/java/gjt/EtchedBorder.java
new file mode 100644
index 00000000000..09ff845014b
--- /dev/null
+++ b/java/gjt/EtchedBorder.java
@@ -0,0 +1,59 @@
+package gjt;
+
+import java.awt.*;
+
+/**
+ * An extension of Border that draws an etched border.
+ *
+ * Drawn etchedIn by default, drawing style used by paint() is
+ * controlled by etchedIn() and etchedOut(). Note that
+ * etchedIn() and etchedOut() do not result in anything being
+ * painted, but only set the state for the next call to paint().
+ * To set the state and paint in one operation, use
+ * paintEtchedIn() and paintEtchedOut().<p>
+ *
+ * The current state of the border may be obtained by calling
+ * isEtchedIn().<p>
+ *
+ * @version 1.0, Apr 1 1996
+ * @author David Geary
+ * @see Border
+ * @see ThreeDRectangle
+ * @see gjt.test.BorderTest
+ */
+public class EtchedBorder extends Border {
+ public EtchedBorder(Component borderMe) {
+ this(borderMe, _defaultThickness, _defaultGap);
+ }
+ public EtchedBorder(Component borderMe,
+ int borderThickness) {
+ this(borderMe, borderThickness, _defaultGap);
+ }
+ public EtchedBorder(Component borderMe,
+ int borderThickness, int gap) {
+ super(borderMe, borderThickness, gap);
+ }
+ public void etchedIn() {
+ ((EtchedRectangle)border()).etchedIn();
+ }
+ public void etchedOut() {
+ ((EtchedRectangle)border()).etchedOut();
+ }
+ public void paintEtchedIn() {
+ ((EtchedRectangle)border()).paintEtchedIn ();
+ }
+ public void paintEtchedOut() {
+ ((EtchedRectangle)border()).paintEtchedOut();
+ }
+ public boolean isEtchedIn() {
+ return ((EtchedRectangle)border()).isEtchedIn();
+ }
+ protected String paramString() {
+ return super.paramString() + (EtchedRectangle)border();
+ }
+ protected DrawnRectangle border() {
+ if(border == null)
+ border = new EtchedRectangle(this, thickness);
+ return border;
+ }
+}