Java Doc for AbstractInformationControlManager.java in  » IDE-Eclipse » jface » org » eclipse » jface » text » 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 » IDE Eclipse » jface » org.eclipse.jface.text 
Source Cross Reference  Class Diagram Java Document (Java Doc) 


java.lang.Object
   org.eclipse.jface.text.AbstractInformationControlManager

All known Subclasses:   org.eclipse.jface.text.AbstractHoverInformationControlManager,  org.eclipse.jface.internal.text.link.contentassist.AdditionalInfoController2,  org.eclipse.jface.text.information.InformationPresenter,  org.eclipse.jface.text.contentassist.AdditionalInfoController,
AbstractInformationControlManager
abstract public class AbstractInformationControlManager (Code)
Manages the life cycle, visibility, layout, and contents of an org.eclipse.jface.text.IInformationControl . This manager can be installed on and removed from a control, referred to as the subject control, i.e. the one from which the subject of the information to be shown is retrieved. Also a manager can be enabled or disabled. An installed and enabled manager can be forced to show information in its information control using showInformation. An information control manager uses an IInformationControlCloser to define the behavior when a presented information control must be closed. The disposal of the subject and the information control are internally handled by the information control manager and are not the responsibility of the information control closer.
See Also:   org.eclipse.jface.text.IInformationControl
since:
   2.0

Inner Class :public interface IInformationControlCloser
Inner Class :final public static class Anchor

Field Summary
final public static  AnchorANCHOR_BOTTOM
    
final public static  AnchorANCHOR_GLOBAL
    
final public static  AnchorANCHOR_LEFT
    
final public static  AnchorANCHOR_RIGHT
    
final public static  AnchorANCHOR_TOP
    
final public static  StringSTORE_LOCATION_X
     Dialog store constant for the location's x-coordinate.
final public static  StringSTORE_LOCATION_Y
     Dialog store constant for the location's y-coordinate.
final public static  StringSTORE_SIZE_HEIGHT
     Dialog store constant for the size's height.
final public static  StringSTORE_SIZE_WIDTH
     Dialog store constant for the size's width.
protected  booleanfDisposed
    
protected  IInformationControlfInformationControl
    
protected  IInformationControlCloserfInformationControlCloser
    
protected  IInformationControlCreatorfInformationControlCreator
    

Constructor Summary
protected  AbstractInformationControlManager(IInformationControlCreator creator)
     Creates a new information control manager using the given information control creator.

Method Summary
protected  RectanglecomputeAvailableArea(Rectangle subjectArea, Rectangle bounds, Anchor anchor)
     Computes the area available for an information control given an anchor and the subject area within bounds.
abstract protected  voidcomputeInformation()
     Computes the information to be displayed and the area in which the computed information is valid.
protected  PointcomputeInformationControlLocation(Rectangle subjectArea, Point controlSize)
     Computes the location of the information control depending on the subject area and the size of the information control.
protected  PointcomputeLocation(Rectangle subjectArea, Point controlSize, Anchor anchor)
     Computes the display location of the information control.
protected  PointcomputeSizeConstraints(Control subjectControl, IInformationControl informationControl)
     Computes the size constraints of the information control in points based on the default font of the given subject control as well as the size constraints in character width.
protected  PointcomputeSizeConstraints(Control subjectControl, Rectangle subjectArea, IInformationControl informationControl)
     Computes the size constraints of the information control in points.
public  voiddispose()
     Disposes this manager and if necessary all dependent parts such as the information control.
public  voiddisposeInformationControl()
     Disposes this manager's information control.
protected  voiddoShowInformation()
     Computes information to be displayed as well as the subject area and initiates that this information is presented in the information control.
protected  IInformationControlgetInformationControl()
     Returns the information control.
protected  AnchorgetNextFallbackAnchor(Anchor anchor)
     Returns the next fallback anchor as specified by this manager's fallback anchor sequence.

The fallback anchor for the given anchor is the one that comes directly after the given anchor or is the first one in the sequence if the given anchor is the last one in the sequence.

Note: It is the callers responsibility to prevent an endless loop i.e.

protected  RectanglegetSubjectArea()
     Returns the actual subject area.
protected  ControlgetSubjectControl()
     Returns the subject control of this manager/information control.
protected  voidhandleInformationControlDisposed()
     Handles the disposal of the information control.
protected  voidhandleSubjectControlDisposed()
     Handles the disposal of the subject control.
protected  voidhideInformationControl()
     Hides the information control and stops the information control closer.
public  voidinstall(Control subjectControl)
     Installs this manager on the given control.
protected  booleanisEnabled()
     Returns whether this manager is enabled or not.
protected  voidpresentInformation()
     Presents the information in the information control or hides the information control if no information should be presented.
protected  RectanglerestoreInformationControlBounds()
     Restores the information control's bounds.
public  voidsetAnchor(Anchor anchor)
     Sets the anchor used for laying out the information control relative to the subject control.
protected  voidsetCloser(IInformationControlCloser closer)
     Sets the information control closer for this manager.
protected  voidsetCustomInformationControlCreator(IInformationControlCreator informationControlCreator)
     Sets the temporary custom control creator, overriding this manager's default information control creator.
public  voidsetEnabled(boolean enabled)
     Sets the enable state of this manager.
public  voidsetFallbackAnchors(Anchor[] fallbackAnchors)
     Sets the anchors fallback sequence used to layout the information control if the original anchor can not be used because the information control would not fit in the display client area.
final protected  voidsetInformation(String information, Rectangle subjectArea)
     Sets the parameters of the information to be displayed.
final protected  voidsetInformation(Object information, Rectangle subjectArea)
     Sets the parameters of the information to be displayed.
public  voidsetMargins(int xMargin, int yMargin)
     Sets the horizontal and vertical margin to be used when laying out the information control relative to the subject control.
public  voidsetRestoreInformationControlBounds(IDialogSettings dialogSettings, boolean restoreLocation, boolean restoreSize)
     Tells this information control manager to open the information control with the values contained in the given dialog settings and to store the control's last valid size in the given dialog settings.

Note: This API is only valid if the information control implements IInformationControlExtension3 .

public  voidsetSizeConstraints(int widthInChar, int heightInChar, boolean enforceAsMinimalSize, boolean enforceAsMaximalSize)
     Sets the width- and height constraints of the information control.
public  voidshowInformation()
     Computes information to be displayed as well as the subject area and initiates that this information is presented in the information control.
protected  voidshowInformationControl(Rectangle subjectArea)
     Shows the information control and starts the information control closer.
protected  voidstoreInformationControlBounds()
     Stores the information control's bounds.
public  voidtakesFocusWhenVisible(boolean takesFocus)
     Tells the manager whether it should set the focus to the information control when made visible.
protected  booleanupdateLocation(Point location, Point size, Rectangle displayArea, Anchor anchor)
     Checks whether a control of the given size at the given location would be completely visible in the given display area when laid out by using the given anchor.

Field Detail
ANCHOR_BOTTOM
final public static Anchor ANCHOR_BOTTOM(Code)
Anchor representing the bottom of the information area



ANCHOR_GLOBAL
final public static Anchor ANCHOR_GLOBAL(Code)
Anchor representing the middle of the subject control
since:
   2.1



ANCHOR_LEFT
final public static Anchor ANCHOR_LEFT(Code)
Anchor representing the left side of the information area



ANCHOR_RIGHT
final public static Anchor ANCHOR_RIGHT(Code)
Anchor representing the right side of the information area



ANCHOR_TOP
final public static Anchor ANCHOR_TOP(Code)
Anchor representing the top of the information area



STORE_LOCATION_X
final public static String STORE_LOCATION_X(Code)
Dialog store constant for the location's x-coordinate.
since:
   3.0



STORE_LOCATION_Y
final public static String STORE_LOCATION_Y(Code)
Dialog store constant for the location's y-coordinate.
since:
   3.0



STORE_SIZE_HEIGHT
final public static String STORE_SIZE_HEIGHT(Code)
Dialog store constant for the size's height.
since:
   3.0



STORE_SIZE_WIDTH
final public static String STORE_SIZE_WIDTH(Code)
Dialog store constant for the size's width.
since:
   3.0



fDisposed
protected boolean fDisposed(Code)
Indicates that the information control has been disposed



fInformationControl
protected IInformationControl fInformationControl(Code)
The information control



fInformationControlCloser
protected IInformationControlCloser fInformationControlCloser(Code)
The information control closer



fInformationControlCreator
protected IInformationControlCreator fInformationControlCreator(Code)
The information control creator




Constructor Detail
AbstractInformationControlManager
protected AbstractInformationControlManager(IInformationControlCreator creator)(Code)
Creates a new information control manager using the given information control creator. By default the following configuration is given:
  • enabled == false
  • horizontal margin == 5 points
  • vertical margin == 5 points
  • width constraint == 60 characters
  • height constraint == 6 characters
  • enforce constraints as minimal size == false
  • enforce constraints as maximal size == false
  • layout anchor == ANCHOR_BOTTOM
  • fall back anchors == { ANCHOR_TOP, ANCHOR_BOTTOM, ANCHOR_LEFT, ANCHOR_RIGHT, ANCHOR_GLOBAL }
  • takes focus when visible == false

Parameters:
  creator - the information control creator




Method Detail
computeAvailableArea
protected Rectangle computeAvailableArea(Rectangle subjectArea, Rectangle bounds, Anchor anchor)(Code)
Computes the area available for an information control given an anchor and the subject area within bounds.
Parameters:
  subjectArea - the subject area
Parameters:
  bounds - the bounds
Parameters:
  anchor - the anchor at the subject area the area available at the given anchor relative to the subject area, confined to themonitor's client area
since:
   3.3



computeInformation
abstract protected void computeInformation()(Code)
Computes the information to be displayed and the area in which the computed information is valid. Implementation of this method must finish their computation by setting the computation results using setInformation.



computeInformationControlLocation
protected Point computeInformationControlLocation(Rectangle subjectArea, Point controlSize)(Code)
Computes the location of the information control depending on the subject area and the size of the information control. This method attempts to find a location at which the information control lies completely in the display's client area while honoring the manager's default anchor. If this isn't possible using the default anchor, the fallback anchors are tried out.
Parameters:
  subjectArea - the information area
Parameters:
  controlSize - the size of the information control the computed location of the information control



computeLocation
protected Point computeLocation(Rectangle subjectArea, Point controlSize, Anchor anchor)(Code)
Computes the display location of the information control. The location is computed considering the given subject area, the anchor at the subject area, and the size of the information control. This method does not care about whether the information control would be completely visible when placed at the result location.
Parameters:
  subjectArea - the subject area
Parameters:
  controlSize - the size of the information control
Parameters:
  anchor - the anchor at the subject area the display location of the information control



computeSizeConstraints
protected Point computeSizeConstraints(Control subjectControl, IInformationControl informationControl)(Code)
Computes the size constraints of the information control in points based on the default font of the given subject control as well as the size constraints in character width.
Parameters:
  subjectControl - the subject control
Parameters:
  informationControl - the information control whose size constraints are computed the computed size constraints in points



computeSizeConstraints
protected Point computeSizeConstraints(Control subjectControl, Rectangle subjectArea, IInformationControl informationControl)(Code)
Computes the size constraints of the information control in points.
Parameters:
  subjectControl - the subject control
Parameters:
  subjectArea - the subject area
Parameters:
  informationControl - the information control whose size constraints are computed the computed size constraints in points
since:
   3.0



dispose
public void dispose()(Code)
Disposes this manager and if necessary all dependent parts such as the information control. For symmetry it first disables this manager.



disposeInformationControl
public void disposeInformationControl()(Code)
Disposes this manager's information control.



doShowInformation
protected void doShowInformation()(Code)
Computes information to be displayed as well as the subject area and initiates that this information is presented in the information control.



getInformationControl
protected IInformationControl getInformationControl()(Code)
Returns the information control. If the information control has not been created yet, it is automatically created. the information control



getNextFallbackAnchor
protected Anchor getNextFallbackAnchor(Anchor anchor)(Code)
Returns the next fallback anchor as specified by this manager's fallback anchor sequence.

The fallback anchor for the given anchor is the one that comes directly after the given anchor or is the first one in the sequence if the given anchor is the last one in the sequence.

Note: It is the callers responsibility to prevent an endless loop i.e. to test whether a given anchor has already been used once. then


Parameters:
  anchor - the current anchor the next fallback anchor or null if no fallback anchor is available



getSubjectArea
protected Rectangle getSubjectArea()(Code)
Returns the actual subject area. the actual subject area



getSubjectControl
protected Control getSubjectControl()(Code)
Returns the subject control of this manager/information control. the subject control



handleInformationControlDisposed
protected void handleInformationControlDisposed()(Code)
Handles the disposal of the information control. By default, the information control closer is stopped.



handleSubjectControlDisposed
protected void handleSubjectControlDisposed()(Code)
Handles the disposal of the subject control. By default, the information control is disposed by calling disposeInformationControl. Subclasses may extend this method.



hideInformationControl
protected void hideInformationControl()(Code)
Hides the information control and stops the information control closer.



install
public void install(Control subjectControl)(Code)
Installs this manager on the given control. The control is now taking the role of the subject control. This implementation sets the control also as the information control closer's subject control and automatically enables this manager.
Parameters:
  subjectControl - the subject control



isEnabled
protected boolean isEnabled()(Code)
Returns whether this manager is enabled or not. true if this manager is enabled otherwise false



presentInformation
protected void presentInformation()(Code)
Presents the information in the information control or hides the information control if no information should be presented. The information has previously been set using setInformation.



restoreInformationControlBounds
protected Rectangle restoreInformationControlBounds()(Code)
Restores the information control's bounds. the stored bounds
since:
   3.0



setAnchor
public void setAnchor(Anchor anchor)(Code)
Sets the anchor used for laying out the information control relative to the subject control. E.g, using ANCHOR_TOP indicates that the information control is position above the area for which the information to be displayed is valid.
Parameters:
  anchor - the layout anchor



setCloser
protected void setCloser(IInformationControlCloser closer)(Code)
Sets the information control closer for this manager.
Parameters:
  closer - the information control closer for this manager



setCustomInformationControlCreator
protected void setCustomInformationControlCreator(IInformationControlCreator informationControlCreator)(Code)
Sets the temporary custom control creator, overriding this manager's default information control creator.
Parameters:
  informationControlCreator - the creator, possibly null
since:
   3.0



setEnabled
public void setEnabled(boolean enabled)(Code)
Sets the enable state of this manager.
Parameters:
  enabled - the enable state



setFallbackAnchors
public void setFallbackAnchors(Anchor[] fallbackAnchors)(Code)
Sets the anchors fallback sequence used to layout the information control if the original anchor can not be used because the information control would not fit in the display client area.

The fallback anchor for a given anchor is the one that comes directly after the given anchor or is the first one in the sequence if the given anchor is the last one in the sequence.

Note: This sequence is ignored if the original anchor is not contained in this list.


Parameters:
  fallbackAnchors - the array with the anchor fallback sequence
See Also:   AbstractInformationControlManager.setAnchor(AbstractInformationControlManager.Anchor)



setInformation
final protected void setInformation(String information, Rectangle subjectArea)(Code)
Sets the parameters of the information to be displayed. These are the information itself and the area for which the given information is valid. This so called subject area is a graphical region of the information control's subject control. This method calls presentInformation() to trigger the presentation of the computed information.
Parameters:
  information - the information
Parameters:
  subjectArea - the subject area



setInformation
final protected void setInformation(Object information, Rectangle subjectArea)(Code)
Sets the parameters of the information to be displayed. These are the information itself and the area for which the given information is valid. This so called subject area is a graphical region of the information control's subject control. This method calls presentInformation() to trigger the presentation of the computed information.
Parameters:
  information - the information
Parameters:
  subjectArea - the subject area
since:
   2.1



setMargins
public void setMargins(int xMargin, int yMargin)(Code)
Sets the horizontal and vertical margin to be used when laying out the information control relative to the subject control.
Parameters:
  xMargin - the x-margin
Parameters:
  yMargin - the y-Margin



setRestoreInformationControlBounds
public void setRestoreInformationControlBounds(IDialogSettings dialogSettings, boolean restoreLocation, boolean restoreSize)(Code)
Tells this information control manager to open the information control with the values contained in the given dialog settings and to store the control's last valid size in the given dialog settings.

Note: This API is only valid if the information control implements IInformationControlExtension3 . Not following this restriction will later result in an UnsupportedOperationException .

The constants used to store the values are:


Parameters:
  dialogSettings -
Parameters:
  restoreLocation - true iff the location is must be (re-)stored
Parameters:
  restoreSize - trueiff the size is (re-)stored
since:
   3.0



setSizeConstraints
public void setSizeConstraints(int widthInChar, int heightInChar, boolean enforceAsMinimalSize, boolean enforceAsMaximalSize)(Code)
Sets the width- and height constraints of the information control.
Parameters:
  widthInChar - the width constraint in number of characters
Parameters:
  heightInChar - the height constrain in number of characters
Parameters:
  enforceAsMinimalSize - indicates whether the constraints describe the minimal allowed size of the control
Parameters:
  enforceAsMaximalSize - indicates whether the constraints describe the maximal allowed size of the control



showInformation
public void showInformation()(Code)
Computes information to be displayed as well as the subject area and initiates that this information is presented in the information control. This happens only if this controller is enabled.



showInformationControl
protected void showInformationControl(Rectangle subjectArea)(Code)
Shows the information control and starts the information control closer. This method may not be called by clients.
Parameters:
  subjectArea - the information area



storeInformationControlBounds
protected void storeInformationControlBounds()(Code)
Stores the information control's bounds.
since:
   3.0



takesFocusWhenVisible
public void takesFocusWhenVisible(boolean takesFocus)(Code)
Tells the manager whether it should set the focus to the information control when made visible.
Parameters:
  takesFocus - true if information control should take focus when made visible



updateLocation
protected boolean updateLocation(Point location, Point size, Rectangle displayArea, Anchor anchor)(Code)
Checks whether a control of the given size at the given location would be completely visible in the given display area when laid out by using the given anchor. If not, this method tries to shift the control orthogonal to the direction given by the anchor to make it visible. If possible it updates the location.

This method returns true if the potentially updated position results in a completely visible control, or false otherwise.
Parameters:
  location - the location of the control
Parameters:
  size - the size of the control
Parameters:
  displayArea - the display area in which the control should be visible
Parameters:
  anchor - anchor for lying out the control trueif the updated location is useful




Methods inherited from java.lang.Object
native protected Object clone() throws CloneNotSupportedException(Code)(Java Doc)
public boolean equals(Object obj)(Code)(Java Doc)
protected void finalize() throws Throwable(Code)(Java Doc)
final native public Class getClass()(Code)(Java Doc)
native public int hashCode()(Code)(Java Doc)
final native public void notify()(Code)(Java Doc)
final native public void notifyAll()(Code)(Java Doc)
public String toString()(Code)(Java Doc)
final native public void wait(long timeout) throws InterruptedException(Code)(Java Doc)
final public void wait(long timeout, int nanos) throws InterruptedException(Code)(Java Doc)
final public void wait() throws InterruptedException(Code)(Java Doc)

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