Java Doc for MouseReshapeTracker.java in  » GIS » GeoTools-2.4.1 » org » geotools » gui » swing » Java Source Code / Java DocumentationJava Source Code and Java Documentation

Java Source Code / Java Documentation
1. 6.0 JDK Core
2. 6.0 JDK Modules
3. 6.0 JDK Modules com.sun
4. 6.0 JDK Modules com.sun.java
5. 6.0 JDK Modules sun
6. 6.0 JDK Platform
7. Ajax
8. Apache Harmony Java SE
9. Aspect oriented
10. Authentication Authorization
11. Blogger System
12. Build
13. Byte Code
14. Cache
15. Chart
16. Chat
17. Code Analyzer
18. Collaboration
19. Content Management System
20. Database Client
21. Database DBMS
22. Database JDBC Connection Pool
23. Database ORM
24. Development
25. EJB Server geronimo
26. EJB Server GlassFish
27. EJB Server JBoss 4.2.1
28. EJB Server resin 3.1.5
29. ERP CRM Financial
30. ESB
31. Forum
32. GIS
33. Graphic Library
34. Groupware
35. HTML Parser
36. IDE
37. IDE Eclipse
38. IDE Netbeans
39. Installer
40. Internationalization Localization
41. Inversion of Control
42. Issue Tracking
43. J2EE
44. JBoss
45. JMS
46. JMX
47. Library
48. Mail Clients
49. Net
50. Parser
51. PDF
52. Portal
53. Profiler
54. Project Management
55. Report
56. RSS RDF
57. Rule Engine
58. Science
59. Scripting
60. Search Engine
61. Security
62. Sevlet Container
63. Source Control
64. Swing Library
65. Template Engine
66. Test Coverage
67. Testing
68. UML
69. Web Crawler
70. Web Framework
71. Web Mail
72. Web Server
73. Web Services
74. Web Services apache cxf 2.0.1
75. Web Services AXIS2
76. Wiki Engine
77. Workflow Engines
78. XML
79. XML UI
Java
Java Tutorial
Java Open Source
Jar File Download
Java Articles
Java Products
Java by API
Photoshop Tutorials
Maya Tutorials
Flash Tutorials
3ds-Max Tutorials
Illustrator Tutorials
GIMP Tutorials
C# / C Sharp
C# / CSharp Tutorial
C# / CSharp Open Source
ASP.Net
ASP.NET Tutorial
JavaScript DHTML
JavaScript Tutorial
JavaScript Reference
HTML / CSS
HTML CSS Reference
C / ANSI-C
C Tutorial
C++
C++ Tutorial
Ruby
PHP
Python
Python Tutorial
Python Open Source
SQL Server / T-SQL
SQL Server / T-SQL Tutorial
Oracle PL / SQL
Oracle PL/SQL Tutorial
PostgreSQL
SQL / MySQL
MySQL Tutorial
VB.Net
VB.Net Tutorial
Flash / Flex / ActionScript
VBA / Excel / Access / Word
XML
XML Tutorial
Microsoft Office PowerPoint 2007 Tutorial
Microsoft Office Excel 2007 Tutorial
Microsoft Office Word 2007 Tutorial
Java Source Code / Java Documentation » GIS » GeoTools 2.4.1 » org.geotools.gui.swing 
Source Cross Reference  Class Diagram Java Document (Java Doc) 


javax.swing.event.MouseInputAdapter
   org.geotools.gui.swing.MouseReshapeTracker

MouseReshapeTracker
class MouseReshapeTracker extends MouseInputAdapter implements Shape(Code)
Controls the position and size of a rectangle which the user can move with their mouse. For example, this class can be used as follows:
 public class MyClass extends JPanel
 {
 private final MouseReshapeTracker slider = new MouseReshapeTracker()
 {
 protected void 
MouseReshapeTracker.clipChangeRequested clipChangeRequested (double xmin, double xmax, double ymin, double ymax) {
 // Indicates what must be done if the user tries to move the
 // rectangle outside the permitted limits.
 // This method is optional.
 }
 protected void 
MouseReshapeTracker.stateChanged stateChanged (boolean isAdjusting) {
 // Method automatically called each time the user
 // changes the position of the rectangle.
 // Code here what it should do in this case.
 }
 };
 private final AffineTransform transform = AffineTransform.getScaleInstance(10, 10);
 public MyClass() {
 slider.
MouseReshapeTracker.setFrame     setFrame (0, 0, 1, 1);
 slider.
MouseReshapeTracker.setClip      setClip (0, 100, 0, 1);
 slider.
MouseReshapeTracker.setTransform setTransform (transform);
 addMouseMotionListener(slider);
 addMouseListener      (slider);
 }
 public void paintComponent(Graphics graphics) {
 AffineTransform tr=...
 Graphics2D g = (Graphics2D) graphics;
 g.transform(transform);
 g.setColor(new Color(128, 64, 92, 64));
 g.fill    (slider);
 }
 }
 

version:
   $Id: MouseReshapeTracker.java 22710 2006-11-12 18:04:54Z desruisseaux $
author:
   Martin Desruisseaux



Constructor Summary
public  MouseReshapeTracker()
     Constructs an object capable of moving and resizing a rectangular shape through mouse movements.
public  MouseReshapeTracker(RectangularShape shape)
     Constructs an object capable of moving and resizing a rectangular shape through mouse movements.
Parameters:
  shape - Rectangular geometric shape.

Method Summary
public synchronized  JComponentaddEditor(Format format, int side, Component toRepaint)
     Adds an editor in which the user can explicitly specify the coordinates of one of the edges of the rectangle.
protected  voidclipChangeRequested(double xmin, double xmax, double ymin, double ymax)
     Method called automatically when a change in the clip is required. This method can be called, for example, when the user manually edits the position of the rectangle in a text field, and the new position falls outside the current clip.
public  booleancontains(Point2D point)
     Indicates whether the rectangular shape contains the specified point.
public  booleancontains(double x, double y)
     Indicates whether the rectangular shape contains the specified point.
public  booleancontains(Rectangle2D rect)
     Indicates whether the rectangular shape contains the specified rectangle.
public  booleancontains(double x, double y, double width, double height)
     Indicates whether the rectangular shape contains the specified rectangle.
public  RectanglegetBounds()
     Returns the position and the bounds of the rectangle.
public  Rectangle2DgetBounds2D()
     Returns the position and the bounds of the rectangle.
public  doublegetCenterX()
     Returns the x coordinate of the centre of the rectangle (logical coordinate, not pixel coordinate).
public  doublegetCenterY()
     Returns the y coordinate of the centre of the rectangle (logical coordinate, not pixel coordinate).
public  Rectangle2DgetClip()
     Returns the bounds between which the rectangle can move.
public  Rectangle2DgetFrame()
     Returns the position and the bounds of the rectangle.
public  doublegetHeight()
     Returns the height of the rectangle.
public  doublegetMaxX()
     Returns the maximum x coordinate of the rectangle (the logical coordinate, not the pixel coordinate).
public  doublegetMaxY()
     Returns the maximum y coordinate of the rectangle (the logical coordinate, not the pixel coordinate).
public  doublegetMinX()
     Returns the minimum x coordinate of the rectangle (the logical coordinate, not the pixel coordinate).
public  doublegetMinY()
     Returns the minimum y coordinate of the rectangle (the logical coordinate, not the pixel coordinate).
public  PathIteratorgetPathIterator(AffineTransform transform)
     Returns a path iterator for the rectangular shape to be drawn.
public  PathIteratorgetPathIterator(AffineTransform transform, double flatness)
     Returns a path iterator for the rectangular shape to be drawn.
public  doublegetWidth()
     Returns the width of the rectangle.
public  booleanintersects(Rectangle2D rect)
     Indicates whether the rectangular shape intersects the specified rectangle.
public  booleanintersects(double x, double y, double width, double height)
     Indicates whether the rectangular shape intersects the specified rectangle.
public  booleanisAdjustable(int side)
     Indicates whether the size of a rectangle can be modified using a specified edge.
public  booleanisEditorsSynchronized(int axis)
     When the position of one of the rectangle's edges is edited manually, specifies whether the opposite edge should also be adjusted.
public  booleanisEmpty()
     Indicates whether the rectangle is empty.
public  booleanisMoveable()
     Indicates whether the rectangle can be moved with the mouse.
public  voidmouseDragged(MouseEvent e)
     Method called automatically during mouse drags.
public  voidmouseMoved(MouseEvent event)
     Method called automatically during mouse movements.
public  voidmousePressed(MouseEvent e)
     Method called automatically when the user presses a mouse button anywhere within the component.
public  voidmouseReleased(MouseEvent event)
     Method called automatically when the user releases the mouse button.
public synchronized  voidremoveEditor(JComponent editor)
     Removes an editor from the list of those which display the coordinates of the visor.
public  voidsetAdjustable(int side, boolean adjustable)
     Specifies whether the size of the rectangle can be modified using the specified edge.
final public  voidsetClip(Rectangle2D rect)
     Defines the bounds between which the rectangle can move.
final public  voidsetClip(double x, double y, double width, double height)
     Defines the bounds between which the rectangle can move.
public  voidsetClipMinMax(double xmin, double xmax, double ymin, double ymax)
     Defines the bounds between which the rectangle can move.
public  voidsetEditorsSynchronized(int axis, boolean state)
     When the position of one of the rectangle's edges is edited manually, specifies whether the opposite edge should also be adjusted.
final public  booleansetFrame(Rectangle2D frame)
     Defines a new position and bounds for the rectangle.
public  booleansetFrame(double x, double y, double width, double height)
     Defines a new position and bounds for the rectangle.
public  voidsetMoveable(boolean moveable)
     Specifies whether the rectangle can be moved with the mouse.
public  voidsetTransform(AffineTransform newTransform)
     Declares the affine transform which will transform the logical coordinates into pixel coordinates.
final public  voidsetX(double min, double max)
     Defines the new range of values covered by the rectangle according to the x axis.
final public  voidsetY(double min, double max)
     Defines the new range of values covered by the rectangle according to the y axis.
protected  voidstateChanged(boolean isAdjusting)
     Method called automatically after the position and size of the visor has changed.
protected  voidstateWillChange(boolean isAdjusting)
     Method called automatically before the position or the size of the visor has changed.
public  StringtoString()
     Returns a character string representing this object.
public  voidupdateEditors()
     Updates the text in the editors.


Constructor Detail
MouseReshapeTracker
public MouseReshapeTracker()(Code)
Constructs an object capable of moving and resizing a rectangular shape through mouse movements. The rectangle will be positioned, by default at the coordinates (0,0). Its width and height will be null.



MouseReshapeTracker
public MouseReshapeTracker(RectangularShape shape)(Code)
Constructs an object capable of moving and resizing a rectangular shape through mouse movements.
Parameters:
  shape - Rectangular geometric shape. This shape does not have to bea rectangle. It could, for example, be a circle. Thecoordinates of this shape will be the initial coordinates of thevisor. They are logical coordinates and not pixel coordinatesNote that the constructor retains a direct reference to thisshape, without creating a clone. As a consequence, any modification carried out on the geometric shape will haverepercussions for this objet MouseReshapeTracker and vice versa.




Method Detail
addEditor
public synchronized JComponent addEditor(Format format, int side, Component toRepaint) throws IllegalArgumentException(Code)
Adds an editor in which the user can explicitly specify the coordinates of one of the edges of the rectangle. Each time the user drags the rectangle, the text appearing in this editor will automatically be updated. If the user explicitly enters a new value in this editor, the position of the rectangle will be adjusted.
Parameters:
  format - Format to use for writing and interpreting the valuesin the editor.
Parameters:
  side - Edge of the rectangle whose coordinates will becontrolled by the editor. It should be one of thefollowing constants:
SwingConstants.NORTH_WESTSwingConstants.NORTHSwingConstants.NORTH_EAST
SwingConstants.WEST SwingConstants.EAST
SwingConstants.SOUTH_WESTSwingConstants.SOUTHSwingConstants.SOUTH_EAST
These constants designate the edge visible on screen. For example, NORTH always designates the top edge on the screen.However, this could correspond to another edge of the logicalshape this depending on the affine transform which was specified during the last call to MouseReshapeTracker.setTransform. For example, AffineTransform.getScaleInstance(+1,-1) has the effect ofinverting the y axis so that the ymax valuesappear to the North rather than the ymin values.
Parameters:
  toRepaint - Component to repaint after a field has been edited,or null if there isn't one. An editor in which the user can specify the position ofone of the edges of the geometric shape.
throws:
  IllegalArgumentException - if side isn't oneof the recognised codes.



clipChangeRequested
protected void clipChangeRequested(double xmin, double xmax, double ymin, double ymax)(Code)
Method called automatically when a change in the clip is required. This method can be called, for example, when the user manually edits the position of the rectangle in a text field, and the new position falls outside the current clip. This method does not have to accept a clip change. It can do nothing, which is the same as refusing any change. It can also always unconditionally accept any change by calling MouseReshapeTracker.setClipMinMax . Finally, it can reach a compromise solution by imposing certain conditions on the changes. The default implementation does nothing, which means that no automatic change in the clip will be authorised.



contains
public boolean contains(Point2D point)(Code)
Indicates whether the rectangular shape contains the specified point. This point should be expressed in logical coordinates.



contains
public boolean contains(double x, double y)(Code)
Indicates whether the rectangular shape contains the specified point. This point should be expressed in logical coordinates.



contains
public boolean contains(Rectangle2D rect)(Code)
Indicates whether the rectangular shape contains the specified rectangle. This rectangle should be expressed in logical coordinates. This method can conservatively return false as permitted by the Shape specification.



contains
public boolean contains(double x, double y, double width, double height)(Code)
Indicates whether the rectangular shape contains the specified rectangle. This rectangle must be expressed in logical coordinates. This method can conservatively return false as permitted by the Shape specification.



getBounds
public Rectangle getBounds()(Code)
Returns the position and the bounds of the rectangle. These bounds can be slightly bigger than those returned by MouseReshapeTracker.getFrame since getBounds2D() returns the bounds of the rectangle visible on screen, which can have certain minimum bounds.



getBounds2D
public Rectangle2D getBounds2D()(Code)
Returns the position and the bounds of the rectangle. These bounds can be slightly bigger than those returned by MouseReshapeTracker.getFrame since getBounds2D() returns the bounds of the rectangle visible on screen, which can have certain minimum bounds.



getCenterX
public double getCenterX()(Code)
Returns the x coordinate of the centre of the rectangle (logical coordinate, not pixel coordinate).



getCenterY
public double getCenterY()(Code)
Returns the y coordinate of the centre of the rectangle (logical coordinate, not pixel coordinate).



getClip
public Rectangle2D getClip()(Code)
Returns the bounds between which the rectangle can move. These bounds are specified in logical coordinates.



getFrame
public Rectangle2D getFrame()(Code)
Returns the position and the bounds of the rectangle. This information is expressed in logical coordinates.
See Also:   MouseReshapeTracker.getCenterX
See Also:   MouseReshapeTracker.getCenterY
See Also:   MouseReshapeTracker.getMinX
See Also:   MouseReshapeTracker.getMaxX
See Also:   MouseReshapeTracker.getMinY
See Also:   MouseReshapeTracker.getMaxY



getHeight
public double getHeight()(Code)
Returns the height of the rectangle. This height is expressed in logical coordinates, not pixel coordinates.



getMaxX
public double getMaxX()(Code)
Returns the maximum x coordinate of the rectangle (the logical coordinate, not the pixel coordinate).



getMaxY
public double getMaxY()(Code)
Returns the maximum y coordinate of the rectangle (the logical coordinate, not the pixel coordinate).



getMinX
public double getMinX()(Code)
Returns the minimum x coordinate of the rectangle (the logical coordinate, not the pixel coordinate).



getMinY
public double getMinY()(Code)
Returns the minimum y coordinate of the rectangle (the logical coordinate, not the pixel coordinate).



getPathIterator
public PathIterator getPathIterator(AffineTransform transform)(Code)
Returns a path iterator for the rectangular shape to be drawn.



getPathIterator
public PathIterator getPathIterator(AffineTransform transform, double flatness)(Code)
Returns a path iterator for the rectangular shape to be drawn.



getWidth
public double getWidth()(Code)
Returns the width of the rectangle. This width is expressed in logical coordinates, not pixel coordinates.



intersects
public boolean intersects(Rectangle2D rect)(Code)
Indicates whether the rectangular shape intersects the specified rectangle. This rectangle must be expressed in logical coordinates. This method can conservatively return true as permitted by the Shape specification.



intersects
public boolean intersects(double x, double y, double width, double height)(Code)
Indicates whether the rectangular shape intersects the specified rectangle. This rectangle must be expressed in logical coordinates. This method can conservatively return true as permitted by the Shape specification.



isAdjustable
public boolean isAdjustable(int side)(Code)
Indicates whether the size of a rectangle can be modified using a specified edge. The specified edge must be one of the following constants:
SwingConstants.NORTH_WEST SwingConstants.NORTH SwingConstants.NORTH_EAST
SwingConstants.WEST SwingConstants.EAST
SwingConstants.SOUTH_WEST SwingConstants.SOUTH SwingConstants.SOUTH_EAST
These constants designate the edge which is visible on screen. For example, NORTH always designates the top edge on the screen. However, this could correspond to another edge of the logical shape this depending on the affine transform which was specified during the last call to MouseReshapeTracker.setTransform . For example, AffineTransform.getScaleInstance(+1,-1) has the effect of inverting the y axis so that the ymax values appear to the North rather than the ymin values.



isEditorsSynchronized
public boolean isEditorsSynchronized(int axis) throws IllegalArgumentException(Code)
When the position of one of the rectangle's edges is edited manually, specifies whether the opposite edge should also be adjusted. By default, the edges are not synchronised.
Parameters:
  axis - SwingConstants.HORIZONTAL to determine thesynchronisation of the left and right edges, orSwingConstants.VERTICAL to determine thesynchronisation of the top and bottom edges. true if the specified edges are synchronised,or false if not
throws:
  IllegalArgumentException - if axis isn't one of the valid codes.



isEmpty
public boolean isEmpty()(Code)
Indicates whether the rectangle is empty. This will be the case if the width and / or height is null.



isMoveable
public boolean isMoveable()(Code)
Indicates whether the rectangle can be moved with the mouse. By default, it can be moved but not resized.



mouseDragged
public void mouseDragged(MouseEvent e)(Code)
Method called automatically during mouse drags. The default implementation applies the mouse movement to the rectangle and notifies the component where the event which it needs to redraw, at least in part, came from.



mouseMoved
public void mouseMoved(MouseEvent event)(Code)
Method called automatically during mouse movements. The default implementation checks whether the cursor is inside the rectangle or on one of its edges, and adjusts the mouse pointer icon accordingly.



mousePressed
public void mousePressed(MouseEvent e)(Code)
Method called automatically when the user presses a mouse button anywhere within the component. The default implementation checks if the button was pressed whilst the mouse cursor was within the rectangle. If so, this object will track the mouse drags to move or resize the rectangle.



mouseReleased
public void mouseReleased(MouseEvent event)(Code)
Method called automatically when the user releases the mouse button. The default implementation calls MouseReshapeTracker.stateChanged with the argument false , in order to inform the derived classes that the changes are finished.



removeEditor
public synchronized void removeEditor(JComponent editor)(Code)
Removes an editor from the list of those which display the coordinates of the visor.
Parameters:
  editor - Editor to remove.



setAdjustable
public void setAdjustable(int side, boolean adjustable)(Code)
Specifies whether the size of the rectangle can be modified using the specified edge. The specified edge must be one of the following constants:
SwingConstants.NORTH_WEST SwingConstants.NORTH SwingConstants.NORTH_EAST
SwingConstants.WEST SwingConstants.EAST
SwingConstants.SOUTH_WEST SwingConstants.SOUTH SwingConstants.SOUTH_EAST
These constants designate the edge which is visible on screen. For example, NORTH always designates the top edge on the screen. However, this could correspond to another edge of the logical shape this depending on the affine transform which was specified during the last call to MouseReshapeTracker.setTransform . For example, AffineTransform.getScaleInstance(+1,-1) has the effect of inverting the y axis so that the ymax values appear to the North rather than the ymin values.



setClip
final public void setClip(Rectangle2D rect)(Code)
Defines the bounds between which the rectangle can move. This method manages infinities correctly if the specified rectangle has redefined its getMaxX() and getMaxY() methods correctly.
See Also:   MouseReshapeTracker.setClipMinMax



setClip
final public void setClip(double x, double y, double width, double height)(Code)
Defines the bounds between which the rectangle can move. This method simply calls MouseReshapeTracker.setClipMinMax setClipMinMax(...) with the appropriate parameters. It is defined in order to avoid confusion amongst programmers used to Java2D conventions. If you want to specify infinite values (in order to widen the visor's bounds to all possible values along certain axes), you must use MouseReshapeTracker.setClipMinMax setClipMinMax(...) rather than setClip(...) .



setClipMinMax
public void setClipMinMax(double xmin, double xmax, double ymin, double ymax)(Code)
Defines the bounds between which the rectangle can move. Note that this method's arguments don't correspond to the normal arguments of java.awt.geom.Rectangle2D . Java2D convention demands that we specify a rectangle using a quadruplet ( x , y , width , height ) However, this is a bad choice in the context of almost all the methods in our library. As well as complicating most calculations (if you need convincing, just count the number of occurrences of the expression x+width even in the geometric classes of Java2D), it is incapable of correctly representing a rectangle which has one or more coordinates stretching to infinity. A better convention would have been to use the minimum and maximum values according to x and y, as this method does.

This method's arguments define the minimum and maximum values that the logical coordinates of the rectangle can take. The values java.lang.Double.NEGATIVE_INFINITY and java.lang.Double.POSITIVE_INFINITY are valid for indicating that the visor can extend across all values according to certain axes. The value java.lang.Double.NaN for a given argument indicates that we want to keep the old value. If the visor doesn't fit completely within the new bounds, it will be moved and resized as needed in order to make it fit.



setEditorsSynchronized
public void setEditorsSynchronized(int axis, boolean state) throws IllegalArgumentException(Code)
When the position of one of the rectangle's edges is edited manually, specifies whether the opposite edge should also be adjusted. By default, the edges are not synchronised.
Parameters:
  axis - SwingConstants.HORIZONTAL to change thesynchronisation of the left and right edges, orSwingConstants.VERTICAL to change the synchronisation of the top and bottom edges.
Parameters:
  state - true to synchronise the edges, or false to desynchronise.
throws:
  IllegalArgumentException - if axis isn't one of the valid codes.



setFrame
final public boolean setFrame(Rectangle2D frame)(Code)
Defines a new position and bounds for the rectangle. The coordinates passed to this method should be logical coordinates rather than pixel coordinates. If the range of values covered by the rectangle is limited by a call to MouseReshapeTracker.setClip , the rectangle will be moved and resized as needed to fit into the permitted region. true if the rectangle's coordinates have changed.
See Also:   MouseReshapeTracker.getFrame



setFrame
public boolean setFrame(double x, double y, double width, double height)(Code)
Defines a new position and bounds for the rectangle. The coordinates passed to this method should be logical coordinates rather than pixel coordinates. If the range of values covered by the rectangle is limited by a call to MouseReshapeTracker.setClip , the rectangle will be moved and resized as needed to fit into the permitted region. true if the rectangle's coordinates have changed.
See Also:   MouseReshapeTracker.setX
See Also:   MouseReshapeTracker.setY



setMoveable
public void setMoveable(boolean moveable)(Code)
Specifies whether the rectangle can be moved with the mouse. The value false indicates that the rectangle cannot be moved, but can still be resized if MouseReshapeTracker.setAdjustable has been called with the appropriate parameters.



setTransform
public void setTransform(AffineTransform newTransform)(Code)
Declares the affine transform which will transform the logical coordinates into pixel coordinates. This is the affine transform specified in java.awt.Graphics2D.transform at the moment that this is drawn. The information contained in this affine transform is necessary for several of this class's methods to work. It is the programmer's responsability to ensure that this information is always up-to-date. By default, MouseReshapeTracker uses an identity transform.



setX
final public void setX(double min, double max)(Code)
Defines the new range of values covered by the rectangle according to the x axis. The values covered along the y axis will not be changed. The values must be expressed in logical coordinates
See Also:   MouseReshapeTracker.getMinX
See Also:   MouseReshapeTracker.getMaxX
See Also:   MouseReshapeTracker.getCenterX



setY
final public void setY(double min, double max)(Code)
Defines the new range of values covered by the rectangle according to the y axis. The values covered along the x axis will not be changed. The values must be expressed in logical coordinates
See Also:   MouseReshapeTracker.getMinY
See Also:   MouseReshapeTracker.getMaxY
See Also:   MouseReshapeTracker.getCenterY



stateChanged
protected void stateChanged(boolean isAdjusting)(Code)
Method called automatically after the position and size of the visor has changed. The call to stateChanged must have been preceded by a call to MouseReshapeTracker.stateWillChange . The derived classes can redefine this method to take the necessary actions when a change has just been actioned. They must not, however, call any method which risks modifying the state of this object. The default implementation does nothing.
Parameters:
  isAdjusting - true if the user is stillmodifying the position of the visor, false if they have released the mouse button.



stateWillChange
protected void stateWillChange(boolean isAdjusting)(Code)
Method called automatically before the position or the size of the visor has changed. A call to stateWillChange is normally followed by a call to MouseReshapeTracker.stateChanged , except if the expected change didn't ultimately occur. The derived classes can redefine this method to take the necessary actions when a change is on the point of being actioned. They must not, however, call any method which risks modifying the state of this object. The default implementation does nothing.
Parameters:
  isAdjusting - true if the user is stillmodifying the position of the visor, false if they have released the mouse button.



toString
public String toString()(Code)
Returns a character string representing this object.



updateEditors
public void updateEditors()(Code)
Updates the text in the editors. Each editor added by the method MouseReshapeTracker.addEditor addEditor(...) will have its text reformatted. This method can be called, for example, after changing the format used by the editors. It is not necessary to call this method each time the mouse moves; it is done automatically.




www.java2java.com | Contact Us
Copyright 2009 - 12 Demo Source and Support. All rights reserved.
All other trademarks are property of their respective owners.