Interface TComponentUIUtil
- All Known Implementing Classes:
TadukooButtonUI,TadukooLabelUI
public interface TComponentUIUtil
This interface provides utilities for
TComponents - this interface is to be implemented in
Component UI classes for them to utilize the methods present to help in accessing customizations
from the TadukooTheme and/or the components themselves and installing and uninstalling said
customizations. It also contains some common paint methods.- Version:
- Alpha v.0.3
- Author:
- Logan Ferree (Tadukoo)
-
Method Summary
Modifier and TypeMethodDescriptiondefault SizablePaintdefault PaintgetBackgroundPaint(Component c, Dimension size) default SizablePaintdefault PaintgetDisabledForegroundPaint(Component c, Dimension size) default SizablePaintdefault PaintgetDisabledTextPaint(Component c, Dimension size) default SizablePaintdefault PaintgetFocusPaint(Component c, Dimension size) default SizablePaintdefault PaintgetForegroundPaint(Component c, Dimension size) Retrieves the Property Prefix string present on the Component UI class.default SizablePaintdefault PaintgetSelectPaint(Component c, Dimension size) default ShapeInfogetShape()default ShapeInfodefault voidInstalls disabledForeground paint on the given Componentdefault voidChecks if the givenComponenthas theHasDisabledForegroundPaintinterface and will install the disabledForeground paint if the interface is present.default voidInstalls disabledText paint on the given Componentdefault voidChecks if the givenComponenthas theHasDisabledTextPaintinterface and will install the disabledText paint if the interface is present.default voidInstalls focus and select paint on the given Componentdefault voidChecks if the givenComponenthas theHasSelectAndFocusPaintsinterface and will install the select and focus paints if the interface is present.default voidInstalls foreground and background paint on the given Componentdefault voidInstalls shape info on the given Componentdefault voidInstalls the customizations associated withTComponenton the givenComponent, which are the foreground and background paints and the shape info.default voidChecks if the givenComponenthas any of the custom interfaces present inTComponentand will install any customizations on it if it has those interfaces.default voidpaintBackground(Graphics g, Component c) default voidUninstalls disabledForeground paint from the given Componentdefault voidChecks if the givenComponenthas theHasDisabledForegroundPaintinterface and will uninstall the disabledForeground paint if the interface is present.default voidUninstalls disabledText paint from the given Componentdefault voidChecks if the givenComponenthas theHasDisabledTextPaintinterface and will uninstall the disabledText paint if the interface is present.default voidUninstalls select and focus paint from the given Componentdefault voidChecks if the givenComponenthas theHasSelectAndFocusPaintsinterface and will uninstall the select and focus paints if the interface is present.default voidUninstalls foreground and background paint from the given Componentdefault voidUninstalls shape info from the given Componentdefault voidUninstalls the customizations associated withTComponentfrom the givenComponent, which are the foreground and background paints and the shape info.default voidChecks if the givenComponenthas any of the custom interfaces present inTComponentand will uninstall any customizations from it if it has those interfaces.
-
Method Details
-
getPropertyPrefixString
String getPropertyPrefixString()Retrieves the Property Prefix string present on the Component UI class.
This method is necessary due to the normal propertyPrefix method being default, so it's not available here in this interface.- Returns:
- The property prefix string for this Component UI
-
getForegroundPaint
- Returns:
- The
SizablePaintto be used for the foreground from the Look & Feel
-
getForegroundPaint
- Parameters:
c- AComponentwhich may have the foreground paint on itsize- TheDimensions of the surface to be painted- Returns:
- The sized
Paintfor the foreground - theSizablePaintused may come from theComponentif it has it, or default to the Look & Feel's paint
-
getBackgroundPaint
- Returns:
- The
SizablePaintto be used for the background from the Look & Feel
-
getBackgroundPaint
- Parameters:
c- AComponentwhich may have the background paint on itsize- TheDimensions of the surface to be painted- Returns:
- The sized
Paintfor the background - theSizablePaintused may come from theComponentif it has it, or default to the Look & Feel's paint
-
getShape
- Returns:
- The
ShapeInfoto be used from the Look & Feel
-
getShape
-
getSelectPaint
- Returns:
- The
SizablePaintto be used for when the Component is selected from the Look & Feel
-
getSelectPaint
- Parameters:
c- AComponentwhich may have the select paint on itsize- TheDimensions of the surface to be painted- Returns:
- The sized
Paintfor the select - theSizablePaintused may come from theComponentif it has it, or default to the Look & Feel's paint
-
getFocusPaint
- Returns:
- The
SizablePaintto be used for when the Component is focused from the Look & Feel
-
getFocusPaint
- Parameters:
c- AComponentwhich may have the focus paint on itsize- TheDimensions of the surface to be painted- Returns:
- The sized
Paintfor the focus - theSizablePaintused may come from theComponentif it has it, or default to the Look & Feel's paint
-
getDisabledTextPaint
- Returns:
- The
SizablePaintto be used for disabled text on the Component from the Look & Feel
-
getDisabledTextPaint
- Parameters:
c- AComponentwhich may have the disabled text paint on itsize- TheDimensions of the surface to be painted- Returns:
- The sized
Paintfor the disabled text - theSizablePaintused may come from theComponentif it has it, or default to the Look & Feel's paint
-
getDisabledForegroundPaint
- Returns:
- The
SizablePaintto be used for disabled foreground on the Component from the Look & Feel
-
getDisabledForegroundPaint
- Parameters:
c- AComponentwhich may have the disabled foreground paint on itsize- TheDimensions of the surface to be painted- Returns:
- The sized
Paintfor the disabled foreground - theSizablePaintused may come from theComponentif it has it, or default to the Look & Feel's paint
-
installHasSizablePaints
Installs foreground and background paint on the given Component- Parameters:
c- TheComponentthatHasSizablePaintsand is to have paints installed
-
installShaped
Installs shape info on the given Component -
installTComponent
Installs the customizations associated withTComponenton the givenComponent, which are the foreground and background paints and the shape info.- Parameters:
c- TheTComponentthat is to have customizations installed
-
installTComponentDefaults
Checks if the givenComponenthas any of the custom interfaces present inTComponentand will install any customizations on it if it has those interfaces.- Parameters:
c- TheComponentthat is to have customizations installed
-
installHasSelectAndFocusPaints
Installs focus and select paint on the given Component- Parameters:
c- TheComponentthatHasSelectAndFocusPaintsand is to have paints installed
-
installHasSelectAndFocusPaintsDefaults
Checks if the givenComponenthas theHasSelectAndFocusPaintsinterface and will install the select and focus paints if the interface is present.- Parameters:
c- TheComponentthat is to have customizations installed
-
installHasDisabledTextPaint
Installs disabledText paint on the given Component- Parameters:
c- TheComponentthatHasDisabledTextPaintand is to have the paint installed
-
installHasDisabledTextPaintDefaults
Checks if the givenComponenthas theHasDisabledTextPaintinterface and will install the disabledText paint if the interface is present.- Parameters:
c- TheComponentthat is to have customizations installed
-
installHasDisabledForegroundPaint
Installs disabledForeground paint on the given Component- Parameters:
c- TheComponentthatHasDisabledForegroundPaintand is to have the paint installed
-
installHasDisabledForegroundPaintDefaults
Checks if the givenComponenthas theHasDisabledForegroundPaintinterface and will install the disabledForeground paint if the interface is present.- Parameters:
c- TheComponentthat is to have customizations installed
-
uninstallHasSizablePaints
Uninstalls foreground and background paint from the given Component- Parameters:
c- TheComponentthatHasSizablePaintsand is to have paints uninstalled
-
uninstallShaped
Uninstalls shape info from the given Component -
uninstallTComponent
Uninstalls the customizations associated withTComponentfrom the givenComponent, which are the foreground and background paints and the shape info.- Parameters:
c- TheTComponentthat is to have customizations uninstalled
-
uninstallTComponentDefaults
Checks if the givenComponenthas any of the custom interfaces present inTComponentand will uninstall any customizations from it if it has those interfaces.- Parameters:
c- TheComponentthat is to have customizations uninstalled
-
uninstallHasSelectAndFocusPaints
Uninstalls select and focus paint from the given Component- Parameters:
c- TheComponentthatHasSelectAndFocusPaintsand is to have paints uninstalled
-
uninstallHasSelectAndFocusPaintsDefaults
Checks if the givenComponenthas theHasSelectAndFocusPaintsinterface and will uninstall the select and focus paints if the interface is present.- Parameters:
c- TheComponentthat is to have customizations uninstalled
-
uninstallHasDisabledTextPaint
Uninstalls disabledText paint from the given Component- Parameters:
c- TheComponentthatHasDisabledTextPaintand is to have the paint uninstalled
-
uninstallHasDisabledTextPaintDefaults
Checks if the givenComponenthas theHasDisabledTextPaintinterface and will uninstall the disabledText paint if the interface is present.- Parameters:
c- TheComponentthat is to have customizations uninstalled
-
uninstallHasDisabledForegroundPaint
Uninstalls disabledForeground paint from the given Component- Parameters:
c- TheComponentthatHasDisabledForegroundPaintand is to have the paint uninstalled
-
uninstallHasDisabledForegroundPaintDefaults
Checks if the givenComponenthas theHasDisabledForegroundPaintinterface and will uninstall the disabledForeground paint if the interface is present.- Parameters:
c- TheComponentthat is to have customizations uninstalled
-
paintBackground
Paints the background for theComponentusing itsShapeInfo(if it has it), and using its background paint (if it has it). If the background paint turns out to be null, the background will not be painted.
This method is to be used in the overridden update method of Component UI classes (where the background is normally painted)
-