public abstract class XdevComponent extends XComponent implements ClientProperties
JPanel.AccessibleJPanel
JComponent.AccessibleJComponent
Container.AccessibleAWTContainer
Component.AccessibleAWTComponent, Component.BaselineResizeBehavior, Component.BltBufferStrategy, Component.FlipBufferStrategy
Modifier and Type | Field and Description |
---|---|
protected int |
alpha
Alpha value of this
XdevComponent . |
protected Color[] |
alphaColors
Alpha colors of this
XdevComponent . |
protected int |
alphaCondition
Alpha condition of this
XdevComponent . |
protected AlphaFilter |
alphaFilter
Alpha filter for this
XdevComponent . |
protected int |
alphaTolerance
Alpha tolerance of this
XdevComponent . |
protected Rectangle |
clip
TODO
|
protected Image |
filteredImage
TODO
|
protected Rectangle |
imageBounds
TODO
|
protected boolean |
remakeImages
TODO
|
protected XdevStyle |
style
Style of this
XdevComponent . |
protected boolean |
useAlphaFilter
TODO
|
listenerList, TOOL_TIP_TEXT_KEY, ui, UNDEFINED_CONDITION, WHEN_ANCESTOR_OF_FOCUSED_COMPONENT, WHEN_FOCUSED, WHEN_IN_FOCUSED_WINDOW
accessibleContext, BOTTOM_ALIGNMENT, CENTER_ALIGNMENT, LEFT_ALIGNMENT, RIGHT_ALIGNMENT, TOP_ALIGNMENT
DATA_FIELD, FORMULAR_CONDITION_FILTER, FORMULAR_CONDITION_PRECISION, FORMULAR_FILTER_OPERATOR, FORMULAR_SKIP, FORMULAR_VERIFIER, TAG_DATA
ABORT, ALLBITS, ERROR, FRAMEBITS, HEIGHT, PROPERTIES, SOMEBITS, WIDTH
Constructor and Description |
---|
XdevComponent()
Create a new
XdevComponent with no layout manager. |
XdevComponent(LayoutManager layout)
Create a new
XdevComponent with the specified layout manager. |
Modifier and Type | Method and Description |
---|---|
protected void |
checkAlphaUse()
TODO
|
protected Graphics2D |
createG2D(Graphics g)
TODO
|
protected void |
drawTexture(Graphics g,
int x,
int y,
int w,
int h)
Draws the texture of this
XdevComponent . |
void |
forcePaint()
Forces this
XdevComponent to repaint. |
int |
getAlpha()
Returns the alpha value for this
XdevComponent . |
Color[] |
getAlphaColors()
Returns the alpha
Color s for this XdevComponent . |
int |
getAlphaCondition()
Returns the alpha condition for this
XdevComponent . |
int |
getAlphaTolerance()
Returns the alpha tolerance for this
XdevComponent . |
int |
getBackgroundType()
Returns the background type as
int for this
XdevComponent . |
Insets |
getBorderInsets()
Returns the insets of the border.
|
int |
getGradientAlign()
Returns the gradient align for this
XdevComponent . |
Color |
getGradientColor1()
Returns the gradient
Color one for this XdevComponent . |
Color |
getGradientColor2()
Returns the gradient
Color two for this XdevComponent . |
Dimension |
getSizeForFilter()
Returns the size for the alpha filter.
|
XdevImage |
getTexture()
Returns the texture for this
XdevComponent . |
int |
getTextureOption()
Returns the texture option for this
XdevComponent . |
String |
getTexturePath()
Returns the texture path for this
XdevComponent . |
boolean |
isOpaque() |
protected void |
paintBackground(Graphics g,
int x,
int y,
int w,
int h)
Paints the background of this
XdevComponent . |
protected boolean |
paintComponent() |
protected void |
paintComponent(Graphics g) |
protected abstract void |
paintImage(Graphics2D g)
TODO
|
void |
setAlpha(int alpha)
Sets the alpha value for this
XdevComponent . |
void |
setAlphaColors(Color... alphaColors)
Sets the alpha
Color s for this XdevComponent . |
void |
setAlphaCondition(int alphaCondition)
Sets the alpha condition for this
XdevComponent . |
void |
setAlphaTolerance(int alphaTolerance)
Sets the alpha tolerance for this
XdevComponent . |
void |
setBackgroundType(int backgroundType)
Sets the background type as
int for this
XdevComponent . |
void |
setBorderTitle(String title)
Sets the border title for this
XdevComponent . |
void |
setGradientAlign(int gradientAlign)
Sets the gradient align for this
XdevComponent . |
void |
setGradientColor1(Color gradientColor1)
Sets the gradient
Color one for this XdevComponent . |
void |
setGradientColor2(Color gradientColor2)
Sets the gradient
Color two for this XdevComponent . |
void |
setTexture(XdevImage image)
Sets the texture for this
XdevComponent . |
void |
setTextureOption(int textureOption)
Sets the texture option for this
XdevComponent . |
void |
setTexturePath(String texturePath)
Sets the texture path for this
XdevComponent . |
String |
toString() |
void |
update(Graphics g) |
getAccessibleContext, getUI, getUIClassID, paramString, setUI, updateUI
addAncestorListener, addNotify, addVetoableChangeListener, computeVisibleRect, contains, createToolTip, disable, enable, firePropertyChange, firePropertyChange, firePropertyChange, fireVetoableChange, getActionForKeyStroke, getActionMap, getAlignmentX, getAlignmentY, getAncestorListeners, getAutoscrolls, getBaseline, getBaselineResizeBehavior, getBorder, getBounds, getClientProperty, getComponentGraphics, getComponentPopupMenu, getConditionForKeyStroke, getDebugGraphicsOptions, getDefaultLocale, getFontMetrics, getGraphics, getHeight, getInheritsPopupMenu, getInputMap, getInputMap, getInputVerifier, getInsets, getInsets, getListeners, getLocation, getMaximumSize, getMinimumSize, getNextFocusableComponent, getPopupLocation, getPreferredSize, getRegisteredKeyStrokes, getRootPane, getSize, getToolTipLocation, getToolTipText, getToolTipText, getTopLevelAncestor, getTransferHandler, getVerifyInputWhenFocusTarget, getVetoableChangeListeners, getVisibleRect, getWidth, getX, getY, grabFocus, hide, isDoubleBuffered, isLightweightComponent, isManagingFocus, isOptimizedDrawingEnabled, isPaintingForPrint, isPaintingOrigin, isPaintingTile, isRequestFocusEnabled, isValidateRoot, paint, paintBorder, paintChildren, paintImmediately, paintImmediately, print, printAll, printBorder, printChildren, printComponent, processComponentKeyEvent, processKeyBinding, processKeyEvent, processMouseEvent, processMouseMotionEvent, putClientProperty, registerKeyboardAction, registerKeyboardAction, removeAncestorListener, removeNotify, removeVetoableChangeListener, repaint, repaint, requestDefaultFocus, requestFocus, requestFocus, requestFocusInWindow, requestFocusInWindow, resetKeyboardActions, reshape, revalidate, scrollRectToVisible, setActionMap, setAlignmentX, setAlignmentY, setAutoscrolls, setBackground, setBorder, setComponentPopupMenu, setDebugGraphicsOptions, setDefaultLocale, setDoubleBuffered, setEnabled, setFocusTraversalKeys, setFont, setForeground, setInheritsPopupMenu, setInputMap, setInputVerifier, setMaximumSize, setMinimumSize, setNextFocusableComponent, setOpaque, setPreferredSize, setRequestFocusEnabled, setToolTipText, setTransferHandler, setUI, setVerifyInputWhenFocusTarget, setVisible, unregisterKeyboardAction
add, add, add, add, add, addContainerListener, addImpl, addPropertyChangeListener, addPropertyChangeListener, applyComponentOrientation, areFocusTraversalKeysSet, countComponents, deliverEvent, doLayout, findComponentAt, findComponentAt, getComponent, getComponentAt, getComponentAt, getComponentCount, getComponents, getComponentZOrder, getContainerListeners, getFocusTraversalKeys, getFocusTraversalPolicy, getLayout, getMousePosition, insets, invalidate, isAncestorOf, isFocusCycleRoot, isFocusCycleRoot, isFocusTraversalPolicyProvider, isFocusTraversalPolicySet, layout, list, list, locate, minimumSize, paintComponents, preferredSize, printComponents, processContainerEvent, processEvent, remove, remove, removeAll, removeContainerListener, setComponentZOrder, setFocusCycleRoot, setFocusTraversalPolicy, setFocusTraversalPolicyProvider, setLayout, transferFocusDownCycle, validate, validateTree
action, add, addComponentListener, addFocusListener, addHierarchyBoundsListener, addHierarchyListener, addInputMethodListener, addKeyListener, addMouseListener, addMouseMotionListener, addMouseWheelListener, bounds, checkImage, checkImage, coalesceEvents, contains, createImage, createImage, createVolatileImage, createVolatileImage, disableEvents, dispatchEvent, enable, enableEvents, enableInputMethods, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, getBackground, getBounds, getColorModel, getComponentListeners, getComponentOrientation, getCursor, getDropTarget, getFocusCycleRootAncestor, getFocusListeners, getFocusTraversalKeysEnabled, getFont, getForeground, getGraphicsConfiguration, getHierarchyBoundsListeners, getHierarchyListeners, getIgnoreRepaint, getInputContext, getInputMethodListeners, getInputMethodRequests, getKeyListeners, getLocale, getLocation, getLocationOnScreen, getMouseListeners, getMouseMotionListeners, getMousePosition, getMouseWheelListeners, getName, getParent, getPeer, getPropertyChangeListeners, getPropertyChangeListeners, getSize, getToolkit, getTreeLock, gotFocus, handleEvent, hasFocus, imageUpdate, inside, isBackgroundSet, isCursorSet, isDisplayable, isEnabled, isFocusable, isFocusOwner, isFocusTraversable, isFontSet, isForegroundSet, isLightweight, isMaximumSizeSet, isMinimumSizeSet, isPreferredSizeSet, isShowing, isValid, isVisible, keyDown, keyUp, list, list, list, location, lostFocus, mouseDown, mouseDrag, mouseEnter, mouseExit, mouseMove, mouseUp, move, nextFocus, paintAll, postEvent, prepareImage, prepareImage, processComponentEvent, processFocusEvent, processHierarchyBoundsEvent, processHierarchyEvent, processInputMethodEvent, processMouseWheelEvent, remove, removeComponentListener, removeFocusListener, removeHierarchyBoundsListener, removeHierarchyListener, removeInputMethodListener, removeKeyListener, removeMouseListener, removeMouseMotionListener, removeMouseWheelListener, removePropertyChangeListener, removePropertyChangeListener, repaint, repaint, repaint, resize, resize, setBounds, setBounds, setComponentOrientation, setCursor, setDropTarget, setFocusable, setFocusTraversalKeysEnabled, setIgnoreRepaint, setLocale, setLocation, setLocation, setName, setSize, setSize, show, show, size, transferFocus, transferFocusBackward, transferFocusUpCycle
protected int alpha
XdevComponent
. Range 0 - 255
.protected int alphaCondition
XdevComponent
.AlphaFilter
protected int alphaTolerance
XdevComponent
.protected Color[] alphaColors
XdevComponent
. A array of Color
s
that will be affected by alpha effects on this XdevComponent
.protected XdevStyle style
XdevComponent
.XdevStyle
protected boolean useAlphaFilter
protected boolean remakeImages
protected AlphaFilter alphaFilter
XdevComponent
.AlphaFilter
protected Image filteredImage
protected Rectangle imageBounds
protected Rectangle clip
public XdevComponent()
XdevComponent
with no layout manager.
Alias for XdevComponent(null)
XdevComponent(LayoutManager)
public XdevComponent(LayoutManager layout)
XdevComponent
with the specified layout manager.layout
- the LayoutManager to usepublic void forcePaint()
XdevComponent
to repaint.Component.repaint()
protected void checkAlphaUse()
public Dimension getSizeForFilter()
Dimension
public Insets getBorderInsets()
Insets
public void setBorderTitle(String title)
XdevComponent
.
Hint: Works only if the component has a
TitledBorder
. You can set a TitledBorder
for this
component via XDEV IDE or manually with JComponent.setBorder(Border)
.
title
- String
to be displayed in title of the border.JComponent.setBorder(Border)
public void update(Graphics g)
update
in class JComponent
public boolean isOpaque()
isOpaque
in class JComponent
protected boolean paintComponent()
protected void paintComponent(Graphics g)
paintComponent
in class JComponent
protected abstract void paintImage(Graphics2D g)
g
- protected Graphics2D createG2D(Graphics g)
g
- protected void paintBackground(Graphics g, int x, int y, int w, int h)
XdevComponent
.g
- Graphics
to paint onx
- the X coordinate for the upper-left corner of the background.y
- the Y coordinate for the upper-left corner of the background.w
- the width for the background.h
- the height for the background.JComponent.setBackground(Color)
,
setBackgroundType(int)
protected void drawTexture(Graphics g, int x, int y, int w, int h)
XdevComponent
.g
- Graphics
to paint onx
- the X coordinate for the upper-left corner of the texture.y
- the Y coordinate for the upper-left corner of the texture.w
- the width for the texture.h
- the height for the texture.setTexture(XdevImage)
public int getAlpha()
XdevComponent
.XdevComponent
.public void setAlpha(int alpha)
XdevComponent
.alpha
- the alpha value for this XdevComponent
, 0
(translucent) to 255 (opaque).public int getAlphaCondition()
XdevComponent
.XdevComponent
.AlphaFilter
public void setAlphaCondition(int alphaCondition)
XdevComponent
.alphaCondition
- the alpha condition for this XdevComponent
.AlphaFilter
public int getAlphaTolerance()
XdevComponent
.XdevComponent
.public void setAlphaTolerance(int alphaTolerance)
XdevComponent
.alphaTolerance
- the alpha tolerance for this XdevComponent
, 0 - 255public Color[] getAlphaColors()
Color
s for this XdevComponent
.Color
s for this XdevComponent
.AlphaFilter
public void setAlphaColors(Color... alphaColors)
Color
s for this XdevComponent
.alphaColors
- the alpha Color
s for this XdevComponent
.AlphaFilter
public int getBackgroundType()
int
for this
XdevComponent
.int
for this
XdevComponent
.XdevStyle
public void setBackgroundType(int backgroundType)
int
for this
XdevComponent
.backgroundType
- the background type as int
for this
XdevComponent
.XdevStyle.NONE
,
XdevStyle.COLOR
,
XdevStyle.GRADIENT
,
XdevStyle.SYSTEM
public Color getGradientColor1()
Color
one for this XdevComponent
.Color
one for this XdevComponent
.XdevStyle.GRADIENT
public void setGradientColor1(Color gradientColor1)
Color
one for this XdevComponent
.
Gradient colors are only applied if the background type of this
XdevComponent
is set to XdevStyle.GRADIENT
. You can set
the background type via XDEV IDE or manually with
setBackgroundType(int)
.
gradientColor1
- the gradient Color
one for this XdevComponent
.XdevStyle.GRADIENT
public Color getGradientColor2()
Color
two for this XdevComponent
.Color
two for this XdevComponent
.XdevStyle.GRADIENT
public void setGradientColor2(Color gradientColor2)
Color
two for this XdevComponent
.
Gradient colors are only applied if the background type of this
XdevComponent
is set to XdevStyle.GRADIENT
. You can set
the background type via XDEV IDE or manually with
setBackgroundType(int)
.
gradientColor2
- the gradient Color
two for this XdevComponent
.XdevStyle.GRADIENT
public int getGradientAlign()
XdevComponent
.XdevComponent
.setBackgroundType(int)
,
XdevStyle.LEFF_RIGHT
,
XdevStyle.TOP_BOTTOM
,
XdevStyle.TOPLEFT_BOTTOMRIGHT
,
XdevStyle.TOPRIGHT_BOTTOMLEFT
,
XdevStyle.RECTANGULAR
,
XdevStyle.RADIAL
public void setGradientAlign(int gradientAlign)
XdevComponent
.
Gradient align is only applied if the background type of this
XdevComponent
is set to XdevStyle.GRADIENT
. You can set
the background type via XDEV IDE or manually with
setBackgroundType(int)
.
gradientAlign
- the gradient align for this XdevComponent
.setBackgroundType(int)
,
XdevStyle.LEFF_RIGHT
,
XdevStyle.TOP_BOTTOM
,
XdevStyle.TOPLEFT_BOTTOMRIGHT
,
XdevStyle.TOPRIGHT_BOTTOMLEFT
,
XdevStyle.RECTANGULAR
,
XdevStyle.RADIAL
public String getTexturePath()
XdevComponent
.XdevComponent
.public void setTexturePath(String texturePath)
XdevComponent
.texturePath
- the texture path for this XdevComponent
.public XdevImage getTexture()
XdevComponent
.XdevComponent
.XdevImage
public void setTexture(XdevImage image)
XdevComponent
.image
- the texture for this XdevComponent
.XdevImage
public int getTextureOption()
XdevComponent
.XdevComponent
as
int
.XdevStyle.CENTER
,
XdevStyle.STRECHED
,
XdevStyle.TILED
public void setTextureOption(int textureOption)
XdevComponent
.textureOption
- the texture option for this XdevComponent
.XdevStyle.CENTER
,
XdevStyle.STRECHED
,
XdevStyle.TILED
Copyright © 2003–2021 XDEV Software. All rights reserved.