summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLillian Angel <langel@redhat.com>2006-06-16 15:14:54 +0000
committerLillian Angel <langel@redhat.com>2006-06-16 15:14:54 +0000
commit4d8d67f4256b733ed8f387622b3d087306674c31 (patch)
tree4845e4b463b3a989f91b11e62aa22afc3eff4975
parentc5d77086bc35604a42e557e7cad79955511a776f (diff)
downloadclasspath-4d8d67f4256b733ed8f387622b3d087306674c31.tar.gz
2006-06-16 Lillian Angel <langel@redhat.com>
* java/awt/font/TextLayout.java: Removed unneeded imports. * javax/swing/plaf/basic/BasicScrollBarUI.java: Added new thumbRollover field. (mouseMoved): Added code to set thumbRollover field. (isThumbRollover): New function. (setThumbRollover): New function. (getSupportsAbsolutePositioning): Implemented. This needs to be changed once the feature has been implemented. * javax/swing/plaf/basic/BasicSliderUI.java: Added new dragging field. (mouseDragged): Initialized dragging field. (isDragging): New function. * javax/swing/plaf/basic/BasicTabbedPaneUI.java (focusGained): Marked as not implemented. (focusLost): Likewise.
-rw-r--r--ChangeLog20
-rw-r--r--java/awt/font/TextLayout.java2
-rw-r--r--javax/swing/plaf/basic/BasicScrollBarUI.java44
-rw-r--r--javax/swing/plaf/basic/BasicSliderUI.java15
-rw-r--r--javax/swing/plaf/basic/BasicTabbedPaneUI.java2
5 files changed, 79 insertions, 4 deletions
diff --git a/ChangeLog b/ChangeLog
index 7659612fb..2e1c7a3ae 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,23 @@
+2006-06-16 Lillian Angel <langel@redhat.com>
+
+ * java/awt/font/TextLayout.java:
+ Removed unneeded imports.
+ * javax/swing/plaf/basic/BasicScrollBarUI.java:
+ Added new thumbRollover field.
+ (mouseMoved): Added code to set thumbRollover field.
+ (isThumbRollover): New function.
+ (setThumbRollover): New function.
+ (getSupportsAbsolutePositioning): Implemented. This
+ needs to be changed once the feature has been
+ implemented.
+ * javax/swing/plaf/basic/BasicSliderUI.java:
+ Added new dragging field.
+ (mouseDragged): Initialized dragging field.
+ (isDragging): New function.
+ * javax/swing/plaf/basic/BasicTabbedPaneUI.java
+ (focusGained): Marked as not implemented.
+ (focusLost): Likewise.
+
2006-06-16 Kyle Galloway <kgallowa@redhat.com>
* gnu/classpath/jdwp/event/filters/ThreadOnlyFilter.java:
diff --git a/java/awt/font/TextLayout.java b/java/awt/font/TextLayout.java
index 3adb46c48..d8a7ce425 100644
--- a/java/awt/font/TextLayout.java
+++ b/java/awt/font/TextLayout.java
@@ -43,13 +43,11 @@ import gnu.classpath.NotImplementedException;
import java.awt.Font;
import java.awt.Graphics2D;
import java.awt.Shape;
-import java.awt.Toolkit;
import java.awt.geom.AffineTransform;
import java.awt.geom.Rectangle2D;
import java.awt.geom.GeneralPath;
import java.awt.geom.Point2D;
import java.text.AttributedCharacterIterator;
-import java.text.AttributedString;
import java.text.Bidi;
import java.util.Map;
diff --git a/javax/swing/plaf/basic/BasicScrollBarUI.java b/javax/swing/plaf/basic/BasicScrollBarUI.java
index b29026342..1ff50e388 100644
--- a/javax/swing/plaf/basic/BasicScrollBarUI.java
+++ b/javax/swing/plaf/basic/BasicScrollBarUI.java
@@ -302,8 +302,10 @@ public class BasicScrollBarUI extends ScrollBarUI implements LayoutManager,
*/
public void mouseMoved(MouseEvent e)
{
- // Not interested in where the mouse
- // is unless it is being dragged.
+ if (thumbRect.contains(e.getPoint()))
+ thumbRollover = true;
+ else
+ thumbRollover = false;
}
/**
@@ -486,6 +488,9 @@ public class BasicScrollBarUI extends ScrollBarUI implements LayoutManager,
/** The scrollbar this UI is acting for. */
protected JScrollBar scrollbar;
+
+ /** True if the mouse is over the thumb. */
+ boolean thumbRollover;
/**
* This method adds a component to the layout.
@@ -1401,4 +1406,39 @@ public class BasicScrollBarUI extends ScrollBarUI implements LayoutManager,
value = min;
return value;
}
+
+ /**
+ * Returns true if the mouse is over the thumb.
+ *
+ * @return true if the mouse is over the thumb.
+ */
+ public boolean isThumbRollover()
+ {
+ return thumbRollover;
+ }
+
+ /**
+ * Set thumbRollover to active. This indicates
+ * whether or not the mouse is over the thumb.
+ *
+ * @param active - true if the mouse is over the thumb.
+ */
+ protected void setThumbRollover(boolean active)
+ {
+ thumbRollover = active;
+ }
+
+ /**
+ * Indicates whether the user can position the thumb with
+ * a mouse click (i.e. middle button).
+ *
+ * @return true if the user can position the thumb with a mouse
+ * click.
+ */
+ public boolean getSupportsAbsolutePositioning()
+ {
+ // The positioning feature has not been implemented.
+ // So, false is always returned.
+ return false;
+ }
}
diff --git a/javax/swing/plaf/basic/BasicSliderUI.java b/javax/swing/plaf/basic/BasicSliderUI.java
index 2fb16f12e..c63b0ecb9 100644
--- a/javax/swing/plaf/basic/BasicSliderUI.java
+++ b/javax/swing/plaf/basic/BasicSliderUI.java
@@ -371,6 +371,7 @@ public class BasicSliderUI extends SliderUI
*/
public void mouseDragged(MouseEvent e)
{
+ dragging = true;
if (slider.isEnabled())
{
currentMouseX = e.getX();
@@ -450,6 +451,7 @@ public class BasicSliderUI extends SliderUI
*/
public void mouseReleased(MouseEvent e)
{
+ dragging = false;
if (slider.isEnabled())
{
currentMouseX = e.getX();
@@ -593,6 +595,9 @@ public class BasicSliderUI extends SliderUI
/** True if the slider has focus. */
private transient boolean hasFocus;
+
+ /** True if the user is dragging the slider. */
+ boolean dragging;
/**
* Creates a new Basic look and feel Slider UI.
@@ -605,6 +610,16 @@ public class BasicSliderUI extends SliderUI
}
/**
+ * Returns true if the user is dragging the slider.
+ *
+ * @return true if the slider is being dragged.
+ */
+ protected boolean isDragging()
+ {
+ return dragging;
+ }
+
+ /**
* Gets the shadow color to be used for this slider. The shadow color is the
* color used for drawing the top and left edges of the track.
*
diff --git a/javax/swing/plaf/basic/BasicTabbedPaneUI.java b/javax/swing/plaf/basic/BasicTabbedPaneUI.java
index 1b2552837..17fa6075b 100644
--- a/javax/swing/plaf/basic/BasicTabbedPaneUI.java
+++ b/javax/swing/plaf/basic/BasicTabbedPaneUI.java
@@ -98,6 +98,7 @@ public class BasicTabbedPaneUI extends TabbedPaneUI implements SwingConstants
* @param e The FocusEvent.
*/
public void focusGained(FocusEvent e)
+ throws NotImplementedException
{
// FIXME: Implement.
}
@@ -108,6 +109,7 @@ public class BasicTabbedPaneUI extends TabbedPaneUI implements SwingConstants
* @param e The FocusEvent.
*/
public void focusLost(FocusEvent e)
+ throws NotImplementedException
{
// FIXME: Implement.
}