|
HOME | |||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--java.awt.Component | +--java.awt.Container | +--javax.swing.JComponent | +--javax.swing.JPanel | +--com.ultraswing.CPanel
A JPanel extension supporting gradient background and image background
Field Summary |
Fields inherited from class javax.swing.JComponent |
accessibleContext, listenerList, TOOL_TIP_TEXT_KEY, ui, UNDEFINED_CONDITION, WHEN_ANCESTOR_OF_FOCUSED_COMPONENT, WHEN_FOCUSED, WHEN_IN_FOCUSED_WINDOW |
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 | |
CPanel()
Create a new CPanel with a double buffer and a flow layout |
|
CPanel(boolean isDoubleBuffered)
Creates a new CPanel with FlowLayout and the specified buffering strategy. |
|
CPanel(LayoutManager layout)
Create a new buffered CPanel with the specified layout manager |
|
CPanel(LayoutManager layout,
boolean isDoubleBuffered)
Creates a new CPanel with the specified layout manager and buffering strategy. |
Method Summary | |
boolean |
contains(Component comp)
Tests if passed comp is contained in this panel |
Dimension |
getPrefferedSize()
|
protected void |
onResize()
NOTE: enableEvents(ComponentEvent.COMPONENT_RESIZED); should be called to enable resize event |
void |
paintBorder(Graphics g)
|
protected void |
processComponentEvent(ComponentEvent e)
|
void |
setBackground(Color bg)
Sets the background color of this component |
void |
setBackgroundImage(Image img)
Sets background image |
void |
setGradientBackground(Color startColor,
Color endColor,
boolean isHorizontal)
Sets gradient background |
Methods inherited from class javax.swing.JPanel |
getAccessibleContext, getUI, getUIClassID, paramString, setUI, updateUI |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Constructor Detail |
public CPanel()
public CPanel(boolean isDoubleBuffered)
isDoubleBuffered
- a boolean, true for double-buffering, which uses additional memory space to achieve fast, flicker-free updatespublic CPanel(LayoutManager layout)
layout
- the LayoutManager to usepublic CPanel(LayoutManager layout, boolean isDoubleBuffered)
layout
- the LayoutManager to useisDoubleBuffered
- a boolean, true for double-buffering, which
uses additional memory space to achieve fast, flicker-free
updatesMethod Detail |
public void setBackground(Color bg)
setBackground
in class JComponent
public void paintBorder(Graphics g)
paintBorder
in class JComponent
public Dimension getPrefferedSize()
public void setGradientBackground(Color startColor, Color endColor, boolean isHorizontal)
startColor
- starting colorendColor
- ending colorisHorizontal
- true to set gradient background color horizontally, false to do it verticallypublic void setBackgroundImage(Image img)
img
- background imagepublic boolean contains(Component comp)
protected void processComponentEvent(ComponentEvent e)
processComponentEvent
in class Component
protected void onResize()
|
HOME | |||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |