Java Doc for Resizable.java in  » Swing-Library » jide-common » com » jidesoft » 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 » Swing Library » jide common » com.jidesoft.swing 
Source Cross Reference  Class Diagram Java Document (Java Doc) 


java.lang.Object
   com.jidesoft.swing.Resizable

Resizable
public class Resizable (Code)
Resizable is a class that support resizable feature.

To use it and make a component resizable, you just need to create new Resizable() and pass in that component to the constructor.


Inner Class :public static class ResizeCorner extends JComponent

Field Summary
final public static  intALL
    
final public static  intLEFT
    
final public static  intLOWER
    
final public static  intLOWER_LEFT
    
final public static  intLOWER_RIGHT
    
final public static  intNONE
    
final public static  StringPROPERTY_RESIZABLE_CORNERS
    
final public static  StringPROPERTY_RESIZE_CORNER_SIZE
    
final public static  intRIGHT
    
final public static  intUPPER
    
final public static  intUPPER_LEFT
    
final public static  intUPPER_RIGHT
    
final protected  JComponent_component
    

Constructor Summary
public  Resizable(JComponent component)
     Creates a new Resizable.

Method Summary
public  voidbeginResizing(int resizeCorner)
     This method is called when resizing opertion started.
protected  MouseInputListenercreateMouseInputListener()
     Creates the MouseInputListener for resizing.
public  voidendResizing(int resizeCorner)
     The method is called when resizing ends.
public  JComponentgetComponent()
     Gets the component which has this Resizable object.
public  MouseInputListenergetMouseInputAdapter()
     Gets the mouse adapter for resizing.
public  intgetResizableCorners()
     Gets the resizable corners.
public  intgetResizeCornerSize()
     Gets resize corner size.
protected  voidinstallListeners()
     Installs the listeners needed to perform resizing operations. You do not need to call this method directly.
public  booleanisTopLevel()
     Checks if the Resizable is added to a top level component.

If it's top level component, it will use screen coordinates to do all calculations during resizing.

public  voidresizing(int resizeCorner, int newX, int newY, int newW, int newH)
     This method is called during the resizing of ResizablePanel.
public  voidsetResizableCorners(int resizableCorners)
     Sets resizable corners.
Parameters:
  resizableCorners - new resizable corners.
public  voidsetResizeCornerSize(int resizeCornerSize)
     Sets the resize corner size.
public  voidsetTopLevel(boolean topLevel)
     To indicates this Resizable is installed on a top level component such as JWindow, JDialog and JFrame v.s.
public  voiduninstallListeners()
     Uninstalls the listeners that created to perform resizing operations.

Field Detail
ALL
final public static int ALL(Code)



LEFT
final public static int LEFT(Code)



LOWER
final public static int LOWER(Code)



LOWER_LEFT
final public static int LOWER_LEFT(Code)



LOWER_RIGHT
final public static int LOWER_RIGHT(Code)



NONE
final public static int NONE(Code)



PROPERTY_RESIZABLE_CORNERS
final public static String PROPERTY_RESIZABLE_CORNERS(Code)



PROPERTY_RESIZE_CORNER_SIZE
final public static String PROPERTY_RESIZE_CORNER_SIZE(Code)



RIGHT
final public static int RIGHT(Code)



UPPER
final public static int UPPER(Code)



UPPER_LEFT
final public static int UPPER_LEFT(Code)



UPPER_RIGHT
final public static int UPPER_RIGHT(Code)



_component
final protected JComponent _component(Code)




Constructor Detail
Resizable
public Resizable(JComponent component)(Code)
Creates a new Resizable. This call will make the component to be resizable.




Method Detail
beginResizing
public void beginResizing(int resizeCorner)(Code)
This method is called when resizing opertion started.
Parameters:
  resizeCorner - the resize corner.



createMouseInputListener
protected MouseInputListener createMouseInputListener()(Code)
Creates the MouseInputListener for resizing. Subclass can override this method to provide its own MouseInputListener to customize exsiting one. the MouseInputListener for resizing.



endResizing
public void endResizing(int resizeCorner)(Code)
The method is called when resizing ends.
Parameters:
  resizeCorner - the resize corner.



getComponent
public JComponent getComponent()(Code)
Gets the component which has this Resizable object. the component which has this Resizable object.



getMouseInputAdapter
public MouseInputListener getMouseInputAdapter()(Code)
Gets the mouse adapter for resizing. the mouse adapter for resizing.



getResizableCorners
public int getResizableCorners()(Code)
Gets the resizable corners. The value is a bitwise OR of eight constants defined in Resizable . resizable corners.



getResizeCornerSize
public int getResizeCornerSize()(Code)
Gets resize corner size. This size is the corner's sensitive area which will trigger the resizing from both sides. the resize corner size.



installListeners
protected void installListeners()(Code)
Installs the listeners needed to perform resizing operations. You do not need to call this method directly. Construstor will call this method automatically.



isTopLevel
public boolean isTopLevel()(Code)
Checks if the Resizable is added to a top level component.

If it's top level component, it will use screen coordinates to do all calculations during resizing. If resizing the resizable panel won't affect any top level container's position, you can return false here. Otherwise, return true. The default implementation always return false. Subclasses can override to return different value. In the case of ResizableWindow or ResizableDialog, this method is overridden and returns true. false.




resizing
public void resizing(int resizeCorner, int newX, int newY, int newW, int newH)(Code)
This method is called during the resizing of ResizablePanel. In default implementation, it call
 setPreferredSize(new Dimension(newW, newH));
 getParent().doLayout();
 
in fact, depending on where you added this ResizablePanel, you may need to override this method to do something else. For example, ResizableWindow uses ResizablePanel to implement resizable feature in JWindow. It overrides this method to call setBounds on JWindow itself.
Parameters:
  resizeCorner - the resize corner.
Parameters:
  newX - the new x position.
Parameters:
  newY - the new y position.
Parameters:
  newW - the new width.
Parameters:
  newH - the new height.



setResizableCorners
public void setResizableCorners(int resizableCorners)(Code)
Sets resizable corners.
Parameters:
  resizableCorners - new resizable corners. The value is a bitwise OR of eight constants defined in Resizable.



setResizeCornerSize
public void setResizeCornerSize(int resizeCornerSize)(Code)
Sets the resize corner size.
Parameters:
  resizeCornerSize - the resize corner size.



setTopLevel
public void setTopLevel(boolean topLevel)(Code)
To indicates this Resizable is installed on a top level component such as JWindow, JDialog and JFrame v.s. a JPanel which is not a top level component because a JPanel must be added to another top level component in order to be displayed.
Parameters:
  topLevel - true or false.



uninstallListeners
public void uninstallListeners()(Code)
Uninstalls the listeners that created to perform resizing operations. After uninstallation, the component will not be resizable anymore.



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.