|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object com.alee.extended.breadcrumb.BreadcrumbUtils
public final class BreadcrumbUtils
This class provides a set of utilities for breadcrumbs. This is a library utility class and its not intended for use outside of the breadcrumbs.
Field Summary | |
---|---|
static java.awt.Color[] |
progressFillColors
|
static float[] |
progressFractions
Breadcrumb element background paint constants. |
static java.awt.Color[] |
progressLineColors
|
static java.awt.Color |
progressSideColor
|
static java.awt.Color[] |
selectedProgressFillColors
|
static java.awt.Color[] |
shadeColors
|
static float[] |
shadeFractions
|
Constructor Summary | |
---|---|
BreadcrumbUtils()
|
Method Summary | |
---|---|
static boolean |
contains(javax.swing.JComponent element,
int x,
int y)
Returns whether breadcrumb element contains specified point or not. |
static java.awt.geom.GeneralPath |
createBorderShape(int w,
int h,
int overlap,
int shadeWidth,
boolean ltr)
Returns element border shape. |
static java.awt.Shape |
createFillShape(javax.swing.JComponent element,
BreadcrumbElementType type,
int w,
int h,
int overlap,
int shadeWidth,
int round,
boolean encloseLast,
boolean ltr)
Returns element fill shape. |
static java.awt.Shape |
getBorderShape(javax.swing.JComponent element,
int w,
int h,
int overlap,
int shadeWidth,
boolean ltr)
Returns cached element border shape. |
static java.awt.Insets |
getElementMargin(javax.swing.JComponent element)
Returns breadcrumb element margin. |
static java.awt.Shape |
getFillShape(javax.swing.JComponent element,
BreadcrumbElementType type,
int w,
int h,
int overlap,
int shadeWidth,
int round,
boolean encloseLast,
boolean ltr)
Returns cached element fill shape. |
static java.awt.Shape |
getProgressFillShape(java.awt.Shape fillShape,
float progress,
boolean ltr)
Returns progress fill shape. |
static java.awt.LinearGradientPaint |
getProgressLinePaint(int h)
Returns progress line paint. |
static java.awt.LinearGradientPaint |
getProgressPaint(javax.swing.JComponent element,
int h)
Returns progress paint. |
static void |
paintElementBackground(java.awt.Graphics2D g2d,
javax.swing.JComponent element)
Paints breadcrumb element background. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public static final float[] progressFractions
public static final java.awt.Color progressSideColor
public static final java.awt.Color[] progressFillColors
public static final java.awt.Color[] selectedProgressFillColors
public static final java.awt.Color[] progressLineColors
public static final float[] shadeFractions
public static final java.awt.Color[] shadeColors
Constructor Detail |
---|
public BreadcrumbUtils()
Method Detail |
---|
public static java.awt.Insets getElementMargin(javax.swing.JComponent element)
element
- element to provide margin for
public static void paintElementBackground(java.awt.Graphics2D g2d, javax.swing.JComponent element)
g2d
- graphics contextelement
- breadcrumb elementpublic static java.awt.Shape getBorderShape(javax.swing.JComponent element, int w, int h, int overlap, int shadeWidth, boolean ltr)
element
- breadcrumb elementw
- element widthh
- element heightoverlap
- breadcrumb element overlapshadeWidth
- breadcrumb shade widthltr
- whether element has LTR orientation or not
public static java.awt.geom.GeneralPath createBorderShape(int w, int h, int overlap, int shadeWidth, boolean ltr)
w
- element widthh
- element heightoverlap
- breadcrumb element overlapshadeWidth
- breadcrumb shade widthltr
- whether element has LTR orientation or not
public static java.awt.Shape getFillShape(javax.swing.JComponent element, BreadcrumbElementType type, int w, int h, int overlap, int shadeWidth, int round, boolean encloseLast, boolean ltr)
element
- breadcrumb elementtype
- element typew
- element widthh
- element heightoverlap
- breadcrumb element overlapshadeWidth
- breadcrumb shade widthround
- breadcrumb corners roundingencloseLast
- whether last breadcrumb element should be enclosed or notltr
- whether element has LTR orientation or not
public static java.awt.Shape createFillShape(javax.swing.JComponent element, BreadcrumbElementType type, int w, int h, int overlap, int shadeWidth, int round, boolean encloseLast, boolean ltr)
element
- breadcrumb elementtype
- element typew
- element widthh
- element heightoverlap
- breadcrumb element overlapshadeWidth
- breadcrumb shade widthround
- breadcrumb corners roundingencloseLast
- whether last breadcrumb element should be enclosed or notltr
- whether element has LTR orientation or not
public static java.awt.Shape getProgressFillShape(java.awt.Shape fillShape, float progress, boolean ltr)
fillShape
- element fill shapeprogress
- progress valueltr
- whether element has LTR orientation or not
public static java.awt.LinearGradientPaint getProgressPaint(javax.swing.JComponent element, int h)
element
- breadcrumb elementh
- element height
public static java.awt.LinearGradientPaint getProgressLinePaint(int h)
h
- element height
public static boolean contains(javax.swing.JComponent element, int x, int y)
element
- breadcrumb elementx
- point X coordinatey
- point Y coordinate
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |