summaryrefslogtreecommitdiff
path: root/java/awt/Frame.java
diff options
context:
space:
mode:
authorMichael Koch <konqueror@gmx.de>2003-05-22 07:14:24 +0000
committerMichael Koch <konqueror@gmx.de>2003-05-22 07:14:24 +0000
commit79c81e9bb17f46f52af4be5949addcd7994b6bd6 (patch)
tree1943a3ff0b8488f3595a25f654c1492e22f71904 /java/awt/Frame.java
parentac09e4e9a0f4b68e65513133e407e7d3bdd0f30e (diff)
downloadclasspath-79c81e9bb17f46f52af4be5949addcd7994b6bd6.tar.gz
2003-05-22 Michael Koch <konqueror@gmx.de>
* java/awt/Checkbox.java (getItemListeners): New method. * java/awt/Dialog.java (Dialog): Reformatted classs documentation. (undecorated): New member variable. (isUndecorated): New method. (setUndecorated): New method. * java/awt/Font.java (getPeer): Added @deprecated tag. * java/awt/Frame.java (maximizedBounds): New member variable. (undecorated): New member variable. (getState): New implementation. (setState): New method. (setExtendedState): New method. (getExtendedState): New method. (getMaximizedBounds): New method. (setMaximizedBounds): New method. (isUndecorated): New method. (setUndecorated): New method. * java/awt/ScrollPaneAdjustable.java (valueIsAdvertising): New member variable. (getValueIsAdjusting): New method. (setValueIsAdjusting): New method. * java/awt/Scrollbar.java (valueIsAdvertising): New member variable. (getValueIsAdjusting): New method. (setValueIsAdjusting): New method. * java/awt/Window.java (focusMgr): Added @since 1.2 tag. (state): Likewise. (focusableWindowState): New member variable. (isFocusableWindow): New method. (getFocusableWindowState): New method. (setFocusableWindowState): New method.
Diffstat (limited to 'java/awt/Frame.java')
-rw-r--r--java/awt/Frame.java99
1 files changed, 91 insertions, 8 deletions
diff --git a/java/awt/Frame.java b/java/awt/Frame.java
index c6742b0c3..5aab5ef49 100644
--- a/java/awt/Frame.java
+++ b/java/awt/Frame.java
@@ -201,6 +201,16 @@ private int state;
*/
private String title = "";
+ /**
+ * Maximized bounds for this frame.
+ */
+ private Rectangle maximizedBounds;
+
+ /**
+ * This field indicates whether the frame is undecorated or not.
+ */
+ private boolean undecorated = false;
+
/*************************************************************************/
/*
@@ -456,14 +466,6 @@ paramString()
return(getClass().getName());
}
-public int
-getState()
-{
- /* FIXME: State might have changed in the peer... Must check. */
-
- return state;
-}
-
public static Frame[]
getFrames()
{
@@ -475,5 +477,86 @@ getFrames()
throw new UnsupportedOperationException(msg);
}
+ public void setState (int state)
+ {
+ int current_state = getExtendedState ();
+
+ if (state == NORMAL
+ && (current_state & ICONIFIED) != 0)
+ setExtendedState (current_state | ICONIFIED);
+
+ if (state == ICONIFIED
+ && (current_state & ~ICONIFIED) == 0)
+ setExtendedState (current_state & ~ICONIFIED);
+ }
+
+ public int getState ()
+ {
+ /* FIXME: State might have changed in the peer... Must check. */
+
+ return (state & ICONIFIED) != 0 ? ICONIFIED : NORMAL;
+ }
+
+ /**
+ * @since 1.4
+ */
+ public void setExtendedState (int state)
+ {
+ this.state = state;
+ }
+
+ /**
+ * @since 1.4
+ */
+ public int getExtendedState ()
+ {
+ return state;
+ }
+
+ /**
+ * @since 1.4
+ */
+ public void setMaximizedBounds (Rectangle maximizedBounds)
+ {
+ throw new Error ("not implemented");
+ }
+
+ /**
+ * Returns the maximized bounds of this frame.
+ *
+ * @return the maximized rectangle, may be null.
+ *
+ * @since 1.4
+ */
+ public Rectangle getMaximizedBounds ()
+ {
+ return maximizedBounds;
+ }
+
+ /**
+ * Returns whether this frame is undecorated or not.
+ *
+ * @since 1.4
+ */
+ public boolean isUndecorated ()
+ {
+ return undecorated;
+ }
+
+ /**
+ * Disables or enables decorations for this frame. This method can only be
+ * called while the frame is not displayable.
+ *
+ * @exception IllegalComponentStateException If this frame is displayable.
+ *
+ * @since 1.4
+ */
+ public void setUndecorated (boolean undecorated)
+ {
+ if (!isDisplayable ())
+ throw new IllegalComponentStateException ();
+
+ this.undecorated = undecorated;
+ }
} // class Frame