|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectjava.awt.Component
java.awt.Container
java.awt.Panel
com.tecnick.junitconv.GroupBox
public class GroupBox
Title: GroupBox Class
Description: Is a Bordered Panel with optional title
Copyright (c) 2002-2006 Tecnick.com S.r.l (www.tecnick.com) Via Ugo
Foscolo n.19 - 09045 Quartu Sant'Elena (CA) - ITALY - www.tecnick.com -
info@tecnick.com
Project homepage: http://junitconv.sourceforge.net
License: http://www.gnu.org/copyleft/gpl.html GPL 2
Nested Class Summary |
---|
Nested classes/interfaces inherited from class java.awt.Panel |
---|
java.awt.Panel.AccessibleAWTPanel |
Nested classes/interfaces inherited from class java.awt.Container |
---|
java.awt.Container.AccessibleAWTContainer |
Nested classes/interfaces inherited from class java.awt.Component |
---|
java.awt.Component.AccessibleAWTComponent, java.awt.Component.BltBufferStrategy, java.awt.Component.FlipBufferStrategy |
Field Summary | |
---|---|
private java.awt.Color |
backgroundColor
Background color. |
private int |
border_padding
Minimum distance between border and component edge. |
private int |
border_width
Border width. |
private java.awt.Font |
default_font
Default font. |
private static long |
serialVersionUID
serialVersionUID |
private int |
text_padding
Minimum distance between border title text. |
private java.awt.Color |
textColor
Text color (foreground color). |
protected java.lang.String |
title
Applet title. |
private java.awt.Font |
title_font
Font for title. |
Fields inherited from class java.awt.Component |
---|
BOTTOM_ALIGNMENT, CENTER_ALIGNMENT, LEFT_ALIGNMENT, RIGHT_ALIGNMENT, TOP_ALIGNMENT |
Fields inherited from interface java.awt.image.ImageObserver |
---|
ABORT, ALLBITS, ERROR, FRAMEBITS, HEIGHT, PROPERTIES, SOMEBITS, WIDTH |
Constructor Summary | |
---|---|
GroupBox()
void constructor. |
|
GroupBox(java.lang.String ti,
int bw,
int bp,
int tp,
java.awt.Font tf)
constructor. |
Method Summary | |
---|---|
private void |
DrawBorder(java.awt.Graphics g,
int bw,
int x1,
int y1,
int x2,
int y2)
Draw a 3D carved border |
java.awt.Dimension |
getMinimumSize()
Redefines the inherited getMinimumSize() method for better sizing |
java.awt.Insets |
insets()
Redefines the inherited method to allow space for drawing the border |
void |
paint(java.awt.Graphics g)
Redefines the inherited method to draw the border and title in addition to inherited functionality. |
void |
setBorderPadding(int bp)
Set the border padding (minimum distance between border and component) |
void |
setBorderWidth(int bw)
Set the border width |
void |
setTextPadding(int tp)
Set the padding around text title |
void |
setTitle(java.lang.String title)
Changes the GroupBox's title. |
void |
setTitleFont(java.awt.Font tf)
Changes the GroupBox's title. |
Methods inherited from class java.awt.Panel |
---|
addNotify, getAccessibleContext |
Methods inherited from class java.awt.Container |
---|
add, add, add, add, add, addContainerListener, addImpl, addPropertyChangeListener, addPropertyChangeListener, applyComponentOrientation, areFocusTraversalKeysSet, countComponents, deliverEvent, doLayout, findComponentAt, findComponentAt, getAlignmentX, getAlignmentY, getComponent, getComponentAt, getComponentAt, getComponentCount, getComponents, getComponentZOrder, getContainerListeners, getFocusTraversalKeys, getFocusTraversalPolicy, getInsets, getLayout, getListeners, getMaximumSize, getMousePosition, getPreferredSize, invalidate, isAncestorOf, isFocusCycleRoot, isFocusCycleRoot, isFocusTraversalPolicyProvider, isFocusTraversalPolicySet, layout, list, list, locate, minimumSize, paintComponents, paramString, preferredSize, print, printComponents, processContainerEvent, processEvent, remove, remove, removeAll, removeContainerListener, removeNotify, setComponentZOrder, setFocusCycleRoot, setFocusTraversalKeys, setFocusTraversalPolicy, setFocusTraversalPolicyProvider, setFont, setLayout, transferFocusBackward, transferFocusDownCycle, update, validate, validateTree |
Methods inherited from class java.awt.Component |
---|
action, add, addComponentListener, addFocusListener, addHierarchyBoundsListener, addHierarchyListener, addInputMethodListener, addKeyListener, addMouseListener, addMouseMotionListener, addMouseWheelListener, bounds, checkImage, checkImage, coalesceEvents, contains, contains, createImage, createImage, createVolatileImage, createVolatileImage, disable, disableEvents, dispatchEvent, enable, enable, enableEvents, enableInputMethods, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, getBackground, getBounds, getBounds, getColorModel, getComponentListeners, getComponentOrientation, getCursor, getDropTarget, getFocusCycleRootAncestor, getFocusListeners, getFocusTraversalKeysEnabled, getFont, getFontMetrics, getForeground, getGraphics, getGraphicsConfiguration, getHeight, getHierarchyBoundsListeners, getHierarchyListeners, getIgnoreRepaint, getInputContext, getInputMethodListeners, getInputMethodRequests, getKeyListeners, getLocale, getLocation, getLocation, getLocationOnScreen, getMouseListeners, getMouseMotionListeners, getMousePosition, getMouseWheelListeners, getName, getParent, getPeer, getPropertyChangeListeners, getPropertyChangeListeners, getSize, getSize, getToolkit, getTreeLock, getWidth, getX, getY, gotFocus, handleEvent, hasFocus, hide, imageUpdate, inside, isBackgroundSet, isCursorSet, isDisplayable, isDoubleBuffered, isEnabled, isFocusable, isFocusOwner, isFocusTraversable, isFontSet, isForegroundSet, isLightweight, isMaximumSizeSet, isMinimumSizeSet, isOpaque, isPreferredSizeSet, isShowing, isValid, isVisible, keyDown, keyUp, list, list, list, location, lostFocus, mouseDown, mouseDrag, mouseEnter, mouseExit, mouseMove, mouseUp, move, nextFocus, paintAll, postEvent, prepareImage, prepareImage, printAll, processComponentEvent, processFocusEvent, processHierarchyBoundsEvent, processHierarchyEvent, processInputMethodEvent, processKeyEvent, processMouseEvent, processMouseMotionEvent, processMouseWheelEvent, remove, removeComponentListener, removeFocusListener, removeHierarchyBoundsListener, removeHierarchyListener, removeInputMethodListener, removeKeyListener, removeMouseListener, removeMouseMotionListener, removeMouseWheelListener, removePropertyChangeListener, removePropertyChangeListener, repaint, repaint, repaint, repaint, requestFocus, requestFocus, requestFocusInWindow, requestFocusInWindow, reshape, resize, resize, setBackground, setBounds, setBounds, setComponentOrientation, setCursor, setDropTarget, setEnabled, setFocusable, setFocusTraversalKeysEnabled, setForeground, setIgnoreRepaint, setLocale, setLocation, setLocation, setMaximumSize, setMinimumSize, setName, setPreferredSize, setSize, setSize, setVisible, show, show, size, toString, transferFocus, transferFocusUpCycle |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Field Detail |
---|
private static final long serialVersionUID
protected java.lang.String title
private int border_padding
private int text_padding
private int border_width
private java.awt.Color textColor
private java.awt.Color backgroundColor
private java.awt.Font title_font
private java.awt.Font default_font
Constructor Detail |
---|
public GroupBox(java.lang.String ti, int bw, int bp, int tp, java.awt.Font tf)
ti
- the title of the GroupBox. To be used if you want a titlebw
- border widthbp
- border paddingtp
- text paddingtf
- title fontpublic GroupBox()
Method Detail |
---|
public void setTitle(java.lang.String title)
title
- the new titlepublic void setTitleFont(java.awt.Font tf)
tf
- the new titlepublic void setBorderWidth(int bw)
bw
- border widthpublic void setBorderPadding(int bp)
bp
- border paddingpublic void setTextPadding(int tp)
tp
- border paddingpublic java.awt.Insets insets()
insets
in class java.awt.Container
public java.awt.Dimension getMinimumSize()
getMinimumSize
in class java.awt.Container
public void paint(java.awt.Graphics g)
paint
in class java.awt.Container
g
- the Graphics objectprivate void DrawBorder(java.awt.Graphics g, int bw, int x1, int y1, int x2, int y2)
g
- current graphicsbw
- 1/2 borderx1
- x origin coordinatey1
- y origin coordinatex2
- x final coordinatey2
- y final coordinate
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |