|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectcom.smartwerkz.jupload.classic.ui.Decorator
public class Decorator
Provides labels and icons for decorating GUI components
| Field Summary | |
|---|---|
java.awt.Color |
bgColor
|
Config |
cfg
|
static java.text.DateFormat |
dateFormat
|
static java.text.NumberFormat |
decimalFormat
|
static java.awt.Color |
defaultBgColor
|
static java.awt.Color |
defaultFgColor
|
static java.awt.Color |
defaultSelectedBgColor
|
static java.awt.Color |
defaultSelectedFgColor
|
java.awt.Color |
fgColor
|
static javax.swing.Icon |
folderIcon
|
java.awt.Font |
font
|
javax.swing.filechooser.FileSystemView |
fsv
|
int |
iconHeight
|
int |
iconWidth
|
static java.text.NumberFormat |
percentFormat
|
java.awt.Color |
selectedBgColor
|
java.awt.Color |
selectedFgColor
|
boolean |
showFilePaths
|
boolean |
showSystemicons
|
boolean |
showThumbs
|
| Constructor Summary | |
|---|---|
Decorator(Config cfg)
|
|
| Method Summary | |
|---|---|
void |
cancelIconLoader()
|
javax.swing.JLabel |
createFolderLabel(UploadNode node)
|
ListLabel |
createFolderListLabel(UploadNode node)
|
ListLabel |
createIconLabel(UploadView view,
UploadNode node)
|
ListLabel |
createIconLabel(UploadView view,
UploadNode node,
int w,
int h)
Creates a label for the given node within the given view with w and h as max dimensions for the label's icon. |
javax.swing.JLabel |
createLabel(UploadNode node)
|
ListLabel |
createListLabel(UploadNode node)
|
void |
decorate(java.awt.Component c)
|
void |
decorate(java.awt.Component c,
boolean selected)
Sets basic decoration to the given component. |
void |
decorate(java.awt.Component c,
boolean colors,
boolean fonts)
|
void |
decorateAll(java.awt.Container cont)
Decorates all components of the given container with the default decoration options. |
void |
decorateAll(java.awt.Container cont,
boolean colors,
boolean fonts)
Decorates all components of the given container with the default decoration options. |
void |
decorateProgressLabel(java.awt.Component c,
boolean selected)
Do not change the foreground. |
static java.lang.String |
formatDateTime(long millis)
|
static java.lang.String |
formatPercent(double percent)
|
static java.lang.String |
formatSize(int current,
int total)
|
static java.lang.String |
formatSize(long size)
|
static java.lang.String |
formatSpeed(int bps)
|
static java.lang.String |
formatTimespan(int totalSecs)
|
static java.awt.Color |
getColor(java.lang.Object resourceName)
|
javax.swing.Icon |
getIcon(UploadNode node,
int w,
int h,
boolean atOnce)
|
java.lang.String |
getLabelText(UploadNode n)
|
javax.swing.Icon |
getUploadIcon(int status)
|
void |
init()
Load the lf infos. |
boolean |
initialized()
|
void |
setIcon(UploadNode node,
javax.swing.JLabel label,
int w,
int h)
Sets the icon for the given node in the given view with w and h as max dimensions for thumbnails. |
void |
setIconLater(UploadNode node,
UploadView view,
int w,
int h)
|
void |
setLabelText(UploadNode n,
javax.swing.JLabel label)
Set the label's text and tooltip according to the current configuration. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
public final javax.swing.filechooser.FileSystemView fsv
public final boolean showThumbs
public final boolean showSystemicons
public final boolean showFilePaths
public final int iconWidth
public final int iconHeight
public static final javax.swing.Icon folderIcon
public static java.awt.Color defaultBgColor
public static java.awt.Color defaultSelectedBgColor
public static java.awt.Color defaultFgColor
public static java.awt.Color defaultSelectedFgColor
public java.awt.Color bgColor
public java.awt.Color selectedBgColor
public java.awt.Color fgColor
public java.awt.Color selectedFgColor
public java.awt.Font font
public final Config cfg
public static final java.text.DateFormat dateFormat
public static final java.text.NumberFormat percentFormat
public static final java.text.NumberFormat decimalFormat
| Constructor Detail |
|---|
public Decorator(Config cfg)
| Method Detail |
|---|
public boolean initialized()
public void init()
public void cancelIconLoader()
public static java.awt.Color getColor(java.lang.Object resourceName)
public void setIconLater(UploadNode node,
UploadView view,
int w,
int h)
public void setIcon(UploadNode node,
javax.swing.JLabel label,
int w,
int h)
public javax.swing.Icon getIcon(UploadNode node,
int w,
int h,
boolean atOnce)
public java.lang.String getLabelText(UploadNode n)
public void setLabelText(UploadNode n,
javax.swing.JLabel label)
public void decorateAll(java.awt.Container cont)
public void decorateAll(java.awt.Container cont,
boolean colors,
boolean fonts)
public void decorate(java.awt.Component c)
public void decorate(java.awt.Component c,
boolean colors,
boolean fonts)
public void decorate(java.awt.Component c,
boolean selected)
public void decorateProgressLabel(java.awt.Component c,
boolean selected)
public ListLabel createIconLabel(UploadView view,
UploadNode node)
public ListLabel createIconLabel(UploadView view,
UploadNode node,
int w,
int h)
public javax.swing.JLabel createFolderLabel(UploadNode node)
public ListLabel createFolderListLabel(UploadNode node)
public javax.swing.JLabel createLabel(UploadNode node)
public ListLabel createListLabel(UploadNode node)
public static java.lang.String formatSize(int current,
int total)
public static java.lang.String formatSize(long size)
public static java.lang.String formatSpeed(int bps)
public static java.lang.String formatPercent(double percent)
public static java.lang.String formatDateTime(long millis)
public static java.lang.String formatTimespan(int totalSecs)
public javax.swing.Icon getUploadIcon(int status)
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||