Java Doc for TitledBorder.java in  » 6.0-JDK-Core » swing » javax » swing » border » Java Source Code / Java DocumentationJava Source Code and Java Documentation

Home
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
26.ERP CRM Financial
27.ESB
28.Forum
29.Game
30.GIS
31.Graphic 3D
32.Graphic Library
33.Groupware
34.HTML Parser
35.IDE
36.IDE Eclipse
37.IDE Netbeans
38.Installer
39.Internationalization Localization
40.Inversion of Control
41.Issue Tracking
42.J2EE
43.J2ME
44.JBoss
45.JMS
46.JMX
47.Library
48.Mail Clients
49.Music
50.Net
51.Parser
52.PDF
53.Portal
54.Profiler
55.Project Management
56.Report
57.RSS RDF
58.Rule Engine
59.Science
60.Scripting
61.Search Engine
62.Security
63.Sevlet Container
64.Source Control
65.Swing Library
66.Template Engine
67.Test Coverage
68.Testing
69.UML
70.Web Crawler
71.Web Framework
72.Web Mail
73.Web Server
74.Web Services
75.Web Services apache cxf 2.2.6
76.Web Services AXIS2
77.Wiki Engine
78.Workflow Engines
79.XML
80.XML UI
Java Source Code / Java Documentation » 6.0 JDK Core » swing » javax.swing.border 
Source Cross Reference  Class Diagram Java Document (Java Doc) 


java.lang.Object
   javax.swing.border.AbstractBorder
      javax.swing.border.TitledBorder

TitledBorder
public class TitledBorder extends AbstractBorder (Code)
A class which implements an arbitrary border with the addition of a String title in a specified position and justification.

If the border, font, or color property values are not specified in the constuctor or by invoking the appropriate set methods, the property values will be defined by the current look and feel, using the following property names in the Defaults Table:

  • "TitledBorder.border"
  • "TitledBorder.font"
  • "TitledBorder.titleColor"

Warning: Serialized objects of this class will not be compatible with future Swing releases. The current serialization support is appropriate for short term storage or RMI between applications running the same version of Swing. As of 1.4, support for long term storage of all JavaBeansTM has been added to the java.beans package. Please see java.beans.XMLEncoder .
version:
   1.49 05/05/07
author:
   David Kloba
author:
   Amy Fowler



Field Summary
final public static  intABOVE_BOTTOM
     Position the title above the border's bottom line.
final public static  intABOVE_TOP
     Position the title above the border's top line.
final public static  intBELOW_BOTTOM
     Position the title below the border's bottom line.
final public static  intBELOW_TOP
     Position the title below the border's top line.
final public static  intBOTTOM
     Position the title in the middle of the border's bottom line.
final public static  intCENTER
     Position title text in the center of the border line.
final public static  intDEFAULT_JUSTIFICATION
     Use the default justification for the title text.
final public static  intDEFAULT_POSITION
     Use the default vertical orientation for the title text.
final protected static  intEDGE_SPACING
    
final public static  intLEADING
     Position title text at the left side of the border line for left to right orientation, at the right side of the border line for right to left orientation.
final public static  intLEFT
     Position title text at the left side of the border line.
final public static  intRIGHT
     Position title text at the right side of the border line.
final protected static  intTEXT_INSET_H
    
final protected static  intTEXT_SPACING
    
final public static  intTOP
     Position the title in the middle of the border's top line.
final public static  intTRAILING
     Position title text at the right side of the border line for left to right orientation, at the left side of the border line for right to left orientation.
protected  Borderborder
    
protected  Stringtitle
    
protected  ColortitleColor
    
protected  FonttitleFont
    
protected  inttitleJustification
    
protected  inttitlePosition
    

Constructor Summary
public  TitledBorder(String title)
     Creates a TitledBorder instance.
public  TitledBorder(Border border)
     Creates a TitledBorder instance with the specified border and an empty title.
public  TitledBorder(Border border, String title)
     Creates a TitledBorder instance with the specified border and title.
public  TitledBorder(Border border, String title, int titleJustification, int titlePosition)
     Creates a TitledBorder instance with the specified border, title, title-justification, and title-position.
public  TitledBorder(Border border, String title, int titleJustification, int titlePosition, Font titleFont)
     Creates a TitledBorder instance with the specified border, title, title-justification, title-position, and title-font.
public  TitledBorder(Border border, String title, int titleJustification, int titlePosition, Font titleFont, Color titleColor)
     Creates a TitledBorder instance with the specified border, title, title-justification, title-position, title-font, and title-color.

Method Summary
public  intgetBaseline(Component c, int width, int height)
     Returns the baseline.
public  Component.BaselineResizeBehaviorgetBaselineResizeBehavior(Component c)
     Returns an enum indicating how the baseline of the border changes as the size changes.
public  BordergetBorder()
     Returns the border of the titled border.
public  InsetsgetBorderInsets(Component c)
     Returns the insets of the border.
public  InsetsgetBorderInsets(Component c, Insets insets)
     Reinitialize the insets parameter with this Border's current Insets.
protected  FontgetFont(Component c)
    
public  DimensiongetMinimumSize(Component c)
     Returns the minimum dimensions this border requires in order to fully display the border and title.
public  StringgetTitle()
     Returns the title of the titled border.
public  ColorgetTitleColor()
     Returns the title-color of the titled border.
public  FontgetTitleFont()
     Returns the title-font of the titled border.
public  intgetTitleJustification()
     Returns the title-justification of the titled border.
public  intgetTitlePosition()
     Returns the title-position of the titled border.
public  booleanisBorderOpaque()
     Returns whether or not the border is opaque.
public  voidpaintBorder(Component c, Graphics g, int x, int y, int width, int height)
     Paints the border for the specified component with the specified position and size.
public  voidsetBorder(Border border)
     Sets the border of the titled border.
public  voidsetTitle(String title)
     Sets the title of the titled border.
public  voidsetTitleColor(Color titleColor)
     Sets the title-color of the titled border.
public  voidsetTitleFont(Font titleFont)
     Sets the title-font of the titled border.
public  voidsetTitleJustification(int titleJustification)
     Sets the title-justification of the titled border.
public  voidsetTitlePosition(int titlePosition)
     Sets the title-position of the titled border.

Field Detail
ABOVE_BOTTOM
final public static int ABOVE_BOTTOM(Code)
Position the title above the border's bottom line.



ABOVE_TOP
final public static int ABOVE_TOP(Code)
Position the title above the border's top line.



BELOW_BOTTOM
final public static int BELOW_BOTTOM(Code)
Position the title below the border's bottom line.



BELOW_TOP
final public static int BELOW_TOP(Code)
Position the title below the border's top line.



BOTTOM
final public static int BOTTOM(Code)
Position the title in the middle of the border's bottom line.



CENTER
final public static int CENTER(Code)
Position title text in the center of the border line.



DEFAULT_JUSTIFICATION
final public static int DEFAULT_JUSTIFICATION(Code)
Use the default justification for the title text.



DEFAULT_POSITION
final public static int DEFAULT_POSITION(Code)
Use the default vertical orientation for the title text.



EDGE_SPACING
final protected static int EDGE_SPACING(Code)



LEADING
final public static int LEADING(Code)
Position title text at the left side of the border line for left to right orientation, at the right side of the border line for right to left orientation.



LEFT
final public static int LEFT(Code)
Position title text at the left side of the border line.



RIGHT
final public static int RIGHT(Code)
Position title text at the right side of the border line.



TEXT_INSET_H
final protected static int TEXT_INSET_H(Code)



TEXT_SPACING
final protected static int TEXT_SPACING(Code)



TOP
final public static int TOP(Code)
Position the title in the middle of the border's top line.



TRAILING
final public static int TRAILING(Code)
Position title text at the right side of the border line for left to right orientation, at the left side of the border line for right to left orientation.



border
protected Border border(Code)



title
protected String title(Code)



titleColor
protected Color titleColor(Code)



titleFont
protected Font titleFont(Code)



titleJustification
protected int titleJustification(Code)



titlePosition
protected int titlePosition(Code)




Constructor Detail
TitledBorder
public TitledBorder(String title)(Code)
Creates a TitledBorder instance.
Parameters:
  title - the title the border should display



TitledBorder
public TitledBorder(Border border)(Code)
Creates a TitledBorder instance with the specified border and an empty title.
Parameters:
  border - the border



TitledBorder
public TitledBorder(Border border, String title)(Code)
Creates a TitledBorder instance with the specified border and title.
Parameters:
  border - the border
Parameters:
  title - the title the border should display



TitledBorder
public TitledBorder(Border border, String title, int titleJustification, int titlePosition)(Code)
Creates a TitledBorder instance with the specified border, title, title-justification, and title-position.
Parameters:
  border - the border
Parameters:
  title - the title the border should display
Parameters:
  titleJustification - the justification for the title
Parameters:
  titlePosition - the position for the title



TitledBorder
public TitledBorder(Border border, String title, int titleJustification, int titlePosition, Font titleFont)(Code)
Creates a TitledBorder instance with the specified border, title, title-justification, title-position, and title-font.
Parameters:
  border - the border
Parameters:
  title - the title the border should display
Parameters:
  titleJustification - the justification for the title
Parameters:
  titlePosition - the position for the title
Parameters:
  titleFont - the font for rendering the title



TitledBorder
public TitledBorder(Border border, String title, int titleJustification, int titlePosition, Font titleFont, Color titleColor)(Code)
Creates a TitledBorder instance with the specified border, title, title-justification, title-position, title-font, and title-color.
Parameters:
  border - the border
Parameters:
  title - the title the border should display
Parameters:
  titleJustification - the justification for the title
Parameters:
  titlePosition - the position for the title
Parameters:
  titleFont - the font of the title
Parameters:
  titleColor - the color of the title




Method Detail
getBaseline
public int getBaseline(Component c, int width, int height)(Code)
Returns the baseline.
throws:
  NullPointerException -
throws:
  IllegalArgumentException -
See Also:   javax.swing.JComponent.getBaseline(intint)
since:
   1.6



getBaselineResizeBehavior
public Component.BaselineResizeBehavior getBaselineResizeBehavior(Component c)(Code)
Returns an enum indicating how the baseline of the border changes as the size changes.
throws:
  NullPointerException -
See Also:   javax.swing.JComponent.getBaseline(intint)
since:
   1.6



getBorder
public Border getBorder()(Code)
Returns the border of the titled border.



getBorderInsets
public Insets getBorderInsets(Component c)(Code)
Returns the insets of the border.
Parameters:
  c - the component for which this border insets value applies



getBorderInsets
public Insets getBorderInsets(Component c, Insets insets)(Code)
Reinitialize the insets parameter with this Border's current Insets.
Parameters:
  c - the component for which this border insets value applies
Parameters:
  insets - the object to be reinitialized



getFont
protected Font getFont(Component c)(Code)



getMinimumSize
public Dimension getMinimumSize(Component c)(Code)
Returns the minimum dimensions this border requires in order to fully display the border and title.
Parameters:
  c - the component where this border will be drawn



getTitle
public String getTitle()(Code)
Returns the title of the titled border.



getTitleColor
public Color getTitleColor()(Code)
Returns the title-color of the titled border.



getTitleFont
public Font getTitleFont()(Code)
Returns the title-font of the titled border.



getTitleJustification
public int getTitleJustification()(Code)
Returns the title-justification of the titled border.



getTitlePosition
public int getTitlePosition()(Code)
Returns the title-position of the titled border.



isBorderOpaque
public boolean isBorderOpaque()(Code)
Returns whether or not the border is opaque.



paintBorder
public void paintBorder(Component c, Graphics g, int x, int y, int width, int height)(Code)
Paints the border for the specified component with the specified position and size.
Parameters:
  c - the component for which this border is being painted
Parameters:
  g - the paint graphics
Parameters:
  x - the x position of the painted border
Parameters:
  y - the y position of the painted border
Parameters:
  width - the width of the painted border
Parameters:
  height - the height of the painted border



setBorder
public void setBorder(Border border)(Code)
Sets the border of the titled border.
Parameters:
  border - the border



setTitle
public void setTitle(String title)(Code)
Sets the title of the titled border. param title the title for the border



setTitleColor
public void setTitleColor(Color titleColor)(Code)
Sets the title-color of the titled border.
Parameters:
  titleColor - the color for the border title



setTitleFont
public void setTitleFont(Font titleFont)(Code)
Sets the title-font of the titled border.
Parameters:
  titleFont - the font for the border title



setTitleJustification
public void setTitleJustification(int titleJustification)(Code)
Sets the title-justification of the titled border.
Parameters:
  titleJustification - the justification for the border



setTitlePosition
public void setTitlePosition(int titlePosition)(Code)
Sets the title-position of the titled border.
Parameters:
  titlePosition - the position for the border



Methods inherited from javax.swing.border.AbstractBorder
public int getBaseline(Component c, int width, int height)(Code)(Java Doc)
public Component.BaselineResizeBehavior getBaselineResizeBehavior(Component c)(Code)(Java Doc)
public Insets getBorderInsets(Component c)(Code)(Java Doc)
public Insets getBorderInsets(Component c, Insets insets)(Code)(Java Doc)
public Rectangle getInteriorRectangle(Component c, int x, int y, int width, int height)(Code)(Java Doc)
public static Rectangle getInteriorRectangle(Component c, Border b, int x, int y, int width, int height)(Code)(Java Doc)
public boolean isBorderOpaque()(Code)(Java Doc)
static boolean isLeftToRight(Component c)(Code)(Java Doc)
public void paintBorder(Component c, Graphics g, int x, int y, int width, int height)(Code)(Java Doc)

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.