GTKIconFactorypublic class GTKIconFactory extends Object
Fields Summary |
---|
private static SynthIcon | expandedIcon | private static SynthIcon | collapsedIcon | private static SynthIcon | radioButtonIcon | private static SynthIcon | checkBoxIcon | private static SynthIcon | menuArrowIcon | private static SynthIcon | menuCheckIcon | private static SynthIcon | menuItemArrowIcon | private static SynthIcon | menuItemCheckIcon | private static SynthIcon | checkBoxMenuItemArrowIcon | private static SynthIcon | checkBoxMenuItemCheckIcon | private static SynthIcon | radioButtonMenuItemArrowIcon | private static SynthIcon | radioButtonMenuItemCheckIcon |
Methods Summary |
---|
public static javax.swing.plaf.synth.SynthIcon | getCheckBoxIcon()
if (checkBoxIcon == null) {
checkBoxIcon = new DelegatingIcon("paintCheckBoxIcon", 13, 13);
}
return checkBoxIcon;
| public static javax.swing.plaf.synth.SynthIcon | getCheckBoxMenuItemArrowIcon()
if (checkBoxMenuItemArrowIcon == null) {
checkBoxMenuItemArrowIcon = new DelegatingIcon(
"paintCheckBoxMenuItemArrowIcon", 13, 13);
}
return checkBoxMenuItemArrowIcon;
| public static javax.swing.plaf.synth.SynthIcon | getCheckBoxMenuItemCheckIcon()
if (checkBoxMenuItemCheckIcon == null) {
checkBoxMenuItemCheckIcon = new DelegatingIcon(
"paintCheckBoxMenuItemCheckIcon", 13, 13);
}
return checkBoxMenuItemCheckIcon;
| public static javax.swing.plaf.synth.SynthIcon | getMenuArrowIcon()
if (menuArrowIcon == null) {
menuArrowIcon = new DelegatingIcon("paintMenuArrowIcon", 13, 13);
}
return menuArrowIcon;
| public static javax.swing.plaf.synth.SynthIcon | getMenuItemArrowIcon()
if (menuItemArrowIcon == null) {
menuItemArrowIcon = new DelegatingIcon("paintMenuItemArrowIcon",
13, 13);
}
return menuItemArrowIcon;
| public static javax.swing.plaf.synth.SynthIcon | getRadioButtonIcon()
if (radioButtonIcon == null) {
radioButtonIcon = new DelegatingIcon("paintRadioButtonIcon",
13, 13);
}
return radioButtonIcon;
| public static javax.swing.plaf.synth.SynthIcon | getRadioButtonMenuItemArrowIcon()
if (radioButtonMenuItemArrowIcon == null) {
radioButtonMenuItemArrowIcon = new DelegatingIcon(
"paintRadioButtonMenuItemArrowIcon", 13, 13);
}
return radioButtonMenuItemArrowIcon;
| public static javax.swing.plaf.synth.SynthIcon | getRadioButtonMenuItemCheckIcon()
if (radioButtonMenuItemCheckIcon == null) {
radioButtonMenuItemCheckIcon = new DelegatingIcon(
"paintRadioButtonMenuItemCheckIcon", 13, 13);
}
return radioButtonMenuItemCheckIcon;
| public static javax.swing.plaf.synth.SynthIcon | getToolBarHandleIcon()
return new ToolBarHandleIcon();
| public static javax.swing.plaf.synth.SynthIcon | getTreeCollapsedIcon()
if (collapsedIcon == null) {
collapsedIcon =
new SynthExpanderIcon("paintTreeCollapsedIcon");
}
return collapsedIcon;
| public static javax.swing.plaf.synth.SynthIcon | getTreeExpandedIcon()
if (expandedIcon == null) {
expandedIcon =
new SynthExpanderIcon("paintTreeExpandedIcon");
}
return expandedIcon;
| public static void | paintCheckBoxIcon(javax.swing.plaf.synth.SynthContext context, java.awt.Graphics g, int x, int y, int w, int h)
GTKStyle style = (GTKStyle)context.getStyle();
int state = context.getComponentState();
int shadowType = GTKConstants.SHADOW_OUT;
if (((JCheckBox)context.getComponent()).isSelected()) {
shadowType = GTKConstants.SHADOW_IN;
}
((GTKStyle)context.getStyle()).getEngine(
context).paintCheck(context, g,
GTKLookAndFeel.synthStateToGTKState(context.getRegion(),
context.getComponentState()), shadowType, "checkbutton",
x, y, w, h);
| public static void | paintCheckBoxMenuItemArrowIcon(javax.swing.plaf.synth.SynthContext context, java.awt.Graphics g, int x, int y, int w, int h)
// Don't paint anything. We are just reserving space so we align the
// menu items correctly.
| public static void | paintCheckBoxMenuItemCheckIcon(javax.swing.plaf.synth.SynthContext context, java.awt.Graphics g, int x, int y, int w, int h)
GTKStyle style = (GTKStyle)context.getStyle();
int state = context.getComponentState();
int shadowType = GTKConstants.SHADOW_OUT;
int gtkState = GTKLookAndFeel.synthStateToGTKState(
context.getRegion(), state);
if ((state & SynthConstants.MOUSE_OVER) != 0) {
gtkState = SynthConstants.MOUSE_OVER;
}
if ((state & SynthConstants.SELECTED) != 0) {
shadowType = GTKConstants.SHADOW_IN;
}
style.getEngine(context).paintCheck(context, g, gtkState,
shadowType, "check", x, y, w, h);
| public static void | paintMenuArrowIcon(javax.swing.plaf.synth.SynthContext context, java.awt.Graphics g, int x, int y, int w, int h)
GTKStyle style = (GTKStyle)context.getStyle();
int gtkState = GTKLookAndFeel.synthStateToGTKState(
context.getRegion(), context.getComponentState());
int shadow = GTKConstants.SHADOW_OUT;
if (gtkState == SynthConstants.MOUSE_OVER) {
shadow = GTKConstants.SHADOW_IN;
}
int arrowDir;
if (context.getComponent().getComponentOrientation().isLeftToRight()) {
arrowDir = GTKConstants.ARROW_RIGHT;
}
else {
arrowDir = GTKConstants.ARROW_LEFT;
}
style.getEngine(context).paintArrow(context, g, gtkState,
shadow, arrowDir, "menuitem", x + 3, y + 3, 7, 7);
| public static void | paintMenuItemArrowIcon(javax.swing.plaf.synth.SynthContext context, java.awt.Graphics g, int x, int y, int w, int h)
// Don't paint anything. We are just reserving space so we align the
// menu items correctly.
| public static void | paintRadioButtonIcon(javax.swing.plaf.synth.SynthContext context, java.awt.Graphics g, int x, int y, int w, int h)
GTKStyle style = (GTKStyle)context.getStyle();
int state = context.getComponentState();
int gtkState = GTKLookAndFeel.synthStateToGTKState(context.getRegion(),
state);
int shadowType = GTKConstants.SHADOW_OUT;
// RadioButton painting appears to be special cased to pass
// SELECTED into the engine even though text colors are PRESSED.
if ((state & SynthConstants.SELECTED) != 0) {
gtkState = SynthConstants.SELECTED;
}
if (gtkState == SynthConstants.SELECTED) {
shadowType = GTKConstants.SHADOW_IN;
}
((GTKStyle)context.getStyle()).getEngine(
context).paintOption(context, g, gtkState, shadowType,
"radiobutton", x, y, w, h);
| public static void | paintRadioButtonMenuItemArrowIcon(javax.swing.plaf.synth.SynthContext context, java.awt.Graphics g, int x, int y, int w, int h)
// Don't paint anything. We are just reserving space so we align the
// menu items correctly.
| public static void | paintRadioButtonMenuItemCheckIcon(javax.swing.plaf.synth.SynthContext context, java.awt.Graphics g, int x, int y, int w, int h)
GTKStyle style = (GTKStyle)context.getStyle();
int state = context.getComponentState();
int gtkState = GTKLookAndFeel.synthStateToGTKState(
context.getRegion(), state);
if ((state & SynthConstants.MOUSE_OVER) != 0) {
gtkState = SynthConstants.MOUSE_OVER;
}
int shadowType = GTKConstants.SHADOW_OUT;
if ((state & SynthConstants.SELECTED) != 0) {
shadowType = GTKConstants.SHADOW_IN;
}
((GTKStyle)context.getStyle()).getEngine(
context).paintOption(context, g, gtkState, shadowType,
"option", x, y, w, h);
| public static void | paintToolBarHandleIcon(javax.swing.plaf.synth.SynthContext context, java.awt.Graphics g, int x, int y, int w, int h)
int orientation =
((JToolBar)context.getComponent()).getOrientation() ==
JToolBar.HORIZONTAL ?
GTKConstants.HORIZONTAL : GTKConstants.VERTICAL;
GTKStyle style = (GTKStyle)context.getStyle();
int gtkState = GTKLookAndFeel.synthStateToGTKState(
context.getRegion(), context.getComponentState());
style.getEngine(context).paintHandle(context, g, gtkState,
GTKConstants.SHADOW_OUT, "handlebox", x, y, w, h,
orientation);
| public static void | paintTreeCollapsedIcon(javax.swing.plaf.synth.SynthContext context, java.awt.Graphics g, int x, int y, int w, int h)
((GTKStyle)context.getStyle()).getEngine(context).paintExpander(
context, g, GTKLookAndFeel.synthStateToGTKState(
context.getRegion(), context.getComponentState()),
GTKConstants.EXPANDER_COLLAPSED, "treeview", x, y, w, h);
| public static void | paintTreeExpandedIcon(javax.swing.plaf.synth.SynthContext context, java.awt.Graphics g, int x, int y, int w, int h)
((GTKStyle)context.getStyle()).getEngine(context).paintExpander(
context, g, GTKLookAndFeel.synthStateToGTKState(
context.getRegion(), context.getComponentState()),
GTKConstants.EXPANDER_EXPANDED, "treeview", x, y, w, h);
|
|