The following document contains the results of PMD's CPD 4.2.2.
| File | Line |
|---|---|
| com/seaglasslookandfeel/painter/TabbedPaneTabPainter.java | 203 |
| com/seaglasslookandfeel/painter/button/SegmentedButtonPainter.java | 209 |
}
return segmentType;
}
/**
* Create the shape for the outer focus ring. Designed to be drawn rather
* than filled.
*
* @param segmentType the segment type.
* @param x the x offset.
* @param y the y offset.
* @param w the width.
* @param h the height.
*
* @return the shape of the outer focus ring. Designed to be drawn rather
* than filled.
*/
protected Shape createOuterFocus(final SegmentType segmentType, final int x, final int y, final int w, final int h) {
switch (segmentType) {
case FIRST:
return shapeGenerator.createRoundRectangle(x - 2, y - 2, w + 3, h + 3, CornerSize.OUTER_FOCUS, CornerStyle.ROUNDED,
CornerStyle.ROUNDED, CornerStyle.SQUARE, CornerStyle.SQUARE);
case MIDDLE:
return shapeGenerator.createRectangle(x - 2, y - 2, w + 3, h + 3);
case LAST:
return shapeGenerator.createRoundRectangle(x - 2, y - 2, w + 3, h + 3, CornerSize.OUTER_FOCUS, CornerStyle.SQUARE,
CornerStyle.SQUARE, CornerStyle.ROUNDED, CornerStyle.ROUNDED);
default:
return shapeGenerator.createRoundRectangle(x - 2, y - 2, w + 3, h + 3, CornerSize.OUTER_FOCUS);
}
}
/**
* Create the shape for the inner focus ring. Designed to be drawn rather
* than filled.
*
* @param segmentType the segment type.
* @param x the x offset.
* @param y the y offset.
* @param w the width.
* @param h the height.
*
* @return the shape of the inner focus ring. Designed to be drawn rather
* than filled.
*/
protected Shape createInnerFocus(final SegmentType segmentType, final int x, final int y, final int w, final int h) {
switch (segmentType) {
case FIRST:
return shapeGenerator.createRoundRectangle(x - 1, y - 1, w + 2, h + 1, CornerSize.INNER_FOCUS, CornerStyle.ROUNDED,
CornerStyle.ROUNDED, CornerStyle.SQUARE, CornerStyle.SQUARE);
case MIDDLE:
return shapeGenerator.createRectangle(x - 2, y - 1, w + 3, h + 1);
case LAST:
return shapeGenerator.createRoundRectangle(x - 2, y - 1, w + 2, h + 1, CornerSize.INNER_FOCUS, CornerStyle.SQUARE,
CornerStyle.SQUARE, CornerStyle.ROUNDED, CornerStyle.ROUNDED);
default:
return shapeGenerator.createRoundRectangle(x - 1, y - 1, w + 1, h + 1, CornerSize.INNER_FOCUS);
}
}
/**
* Create the shape for the border.
*
* @param segmentType the segment type.
* @param x the x offset.
* @param y the y offset.
* @param w the width.
* @param h the height.
*
* @return the shape of the border.
*/
protected Shape createBorder(final SegmentType segmentType, final int x, final int y, final int w, final int h) {
switch (segmentType) {
case FIRST:
return shapeGenerator.createRoundRectangle(x, y, w + 2, h, CornerSize.BORDER, CornerStyle.ROUNDED, CornerStyle.ROUNDED,
CornerStyle.SQUARE, CornerStyle.SQUARE);
case MIDDLE:
return shapeGenerator.createRectangle(x - 2, y, w + 4, h);
case LAST:
return shapeGenerator.createRoundRectangle(x - 2, y, w + 2, h, CornerSize.BORDER, CornerStyle.SQUARE, CornerStyle.SQUARE,
CornerStyle.ROUNDED, CornerStyle.ROUNDED);
default:
return shapeGenerator.createRoundRectangle(x, y, w, h, CornerSize.BORDER);
}
}
/**
* Create the shape for the interior.
*
* @param segmentType the segment type.
* @param x the x offset.
* @param y the y offset.
* @param w the width.
* @param h the height.
*
* @return the shape of the interior.
*/
protected Shape createInterior(final SegmentType segmentType, final int x, final int y, final int w, final int h) {
switch (segmentType) {
case FIRST:
return shapeGenerator.createRoundRectangle(x + 1, y + 1, w, h - 2, CornerSize.INTERIOR, CornerStyle.ROUNDED,
CornerStyle.ROUNDED, CornerStyle.SQUARE, CornerStyle.SQUARE);
case MIDDLE:
return shapeGenerator.createRectangle(x - 2, y + 1, w + 3, h - 2);
case LAST:
return shapeGenerator.createRoundRectangle(x - 2, y + 1, w + 1, h - 2, CornerSize.INTERIOR, CornerStyle.SQUARE,
CornerStyle.SQUARE, CornerStyle.ROUNDED, CornerStyle.ROUNDED);
default:
return shapeGenerator.createRoundRectangle(x + 1, y + 1, w - 2, h - 2, CornerSize.INTERIOR);
}
}
}
| |
| File | Line |
|---|---|
| com/seaglasslookandfeel/SeaGlassLookAndFeel.java | 1765 |
| com/seaglasslookandfeel/SeaGlassLookAndFeel.java | 1790 |
d.put(p + ".contentMargins", new InsetsUIResource(6, 6, 6, 6));
d.put(p + ".searchIconWidth", new Integer(15));
d.put(p + ".cancelIconWidth", new Integer(15));
d.put(p + ".popupIconWidth", new Integer(7));
d.put(p + ".searchLeftInnerMargin", new Integer(3));
d.put(p + ".searchRightInnerMargin", new Integer(3));
d.put(p + ".placeholderTextColor", d.get("seaGlassSearchPlaceholderText"));
d.put(p + ".background", getDerivedColor("nimbusLightBackground", 0.0f, 0.0f, 0.0f, 0, true));
d.put(p + "[Disabled].backgroundPainter", new LazyPainter(c, TextComponentPainter.Which.BACKGROUND_DISABLED));
d.put(p + "[Enabled].backgroundPainter", new LazyPainter(c, TextComponentPainter.Which.BACKGROUND_ENABLED));
d.put(p + "[Selected].backgroundPainter", new LazyPainter(c, TextComponentPainter.Which.BACKGROUND_SELECTED));
d.put(p + "[Disabled].borderPainter", new LazyPainter(c, TextComponentPainter.Which.BORDER_DISABLED));
d.put(p + "[Focused].borderPainter", new LazyPainter(c, TextComponentPainter.Which.BORDER_FOCUSED));
d.put(p + "[Enabled].borderPainter", new LazyPainter(c, TextComponentPainter.Which.BORDER_ENABLED));
// Paint with SearchFieldPainter.
d.put(p + "[Disabled+SearchField].backgroundPainter", new LazyPainter(cs, SearchFieldPainter.Which.BACKGROUND_DISABLED));
d.put(p + "[Enabled+SearchField].backgroundPainter", new LazyPainter(cs, SearchFieldPainter.Which.BACKGROUND_ENABLED));
d.put(p + "[Selected+SearchField].backgroundPainter", new LazyPainter(cs, SearchFieldPainter.Which.BACKGROUND_SELECTED));
d.put(p + "[Disabled+SearchField].borderPainter", new LazyPainter(cs, SearchFieldPainter.Which.BORDER_DISABLED));
d.put(p + "[Focused+SearchField].borderPainter", new LazyPainter(cs, SearchFieldPainter.Which.BORDER_FOCUSED));
d.put(p + "[Enabled+SearchField].borderPainter", new LazyPainter(cs, SearchFieldPainter.Which.BORDER_ENABLED));
// Initialize TextArea
// TextArea in scroll pane is visually the same as editor pane.
p = "TextArea";
| |
| File | Line |
|---|---|
| com/seaglasslookandfeel/util/MacKeybindings.java | 59 |
| com/seaglasslookandfeel/util/MacKeybindings.java | 195 |
DefaultEditorKit.beepAction,
"PASTE",
DefaultEditorKit.pasteAction,
"RIGHT",
DefaultEditorKit.forwardAction,
"KP_RIGHT",
DefaultEditorKit.forwardAction,
"LEFT",
DefaultEditorKit.backwardAction,
"KP_LEFT",
DefaultEditorKit.backwardAction,
"shift RIGHT",
DefaultEditorKit.selectionForwardAction,
"shift KP_RIGHT",
DefaultEditorKit.selectionForwardAction,
"shift LEFT",
DefaultEditorKit.selectionBackwardAction,
"shift KP_LEFT",
DefaultEditorKit.selectionBackwardAction,
"UP",
DefaultEditorKit.upAction,
"KP_UP",
DefaultEditorKit.upAction,
"DOWN",
DefaultEditorKit.downAction,
"KP_DOWN",
DefaultEditorKit.downAction,
"shift UP",
DefaultEditorKit.selectionUpAction,
"shift KP_UP",
DefaultEditorKit.selectionUpAction,
"shift DOWN",
DefaultEditorKit.selectionDownAction,
"shift KP_DOWN",
DefaultEditorKit.selectionDownAction,
"alt LEFT",
DefaultEditorKit.previousWordAction,
"alt KP_LEFT",
DefaultEditorKit.previousWordAction,
"alt RIGHT",
DefaultEditorKit.nextWordAction,
"alt KP_RIGHT",
DefaultEditorKit.nextWordAction,
"alt shift LEFT",
DefaultEditorKit.selectionPreviousWordAction,
"alt shift KP_LEFT",
DefaultEditorKit.selectionPreviousWordAction,
"alt shift RIGHT",
DefaultEditorKit.selectionNextWordAction,
"alt shift KP_RIGHT",
DefaultEditorKit.selectionNextWordAction,
"alt UP",
DefaultEditorKit.beginLineAction,
"alt KP_UP",
DefaultEditorKit.beginLineAction,
"ctrl LEFT",
DefaultEditorKit.beginLineAction,
"ctrl KP_LEFT",
DefaultEditorKit.beginLineAction,
"meta LEFT",
DefaultEditorKit.beginLineAction,
"meta KP_LEFT",
DefaultEditorKit.beginLineAction,
"alt DOWN",
DefaultEditorKit.endLineAction,
"alt KP_DOWN",
DefaultEditorKit.endLineAction,
"ctrl RIGHT",
DefaultEditorKit.endLineAction,
"ctrl KP_RIGHT",
DefaultEditorKit.endLineAction,
"meta RIGHT",
DefaultEditorKit.endLineAction,
"meta KP_RIGHT",
DefaultEditorKit.endLineAction,
"ctrl shift LEFT",
DefaultEditorKit.selectionBeginLineAction,
"ctrl shift KP_LEFT",
DefaultEditorKit.selectionBeginLineAction,
"meta shift LEFT",
DefaultEditorKit.selectionBeginLineAction,
"meta shift KP_LEFT",
DefaultEditorKit.selectionBeginLineAction,
"ctrl shift RIGHT",
DefaultEditorKit.selectionEndLineAction,
"ctrl shift KP_RIGHT",
DefaultEditorKit.selectionEndLineAction,
"meta shift RIGHT",
DefaultEditorKit.selectionEndLineAction,
"meta shift KP_RIGHT",
DefaultEditorKit.selectionEndLineAction,
"HOME",
DefaultEditorKit.beginAction,
"END",
DefaultEditorKit.endAction,
"meta UP",
DefaultEditorKit.beginAction,
"meta KP_UP",
DefaultEditorKit.beginAction,
"meta DOWN",
DefaultEditorKit.endAction,
"meta KP_DOWN",
DefaultEditorKit.endAction,
"shift HOME",
DefaultEditorKit.selectionBeginAction,
"shift END",
DefaultEditorKit.selectionEndAction,
"meta A",
DefaultEditorKit.selectAllAction,
"meta shift A",
"unselect",
"controlBackground shift O",
"toggle-componentOrientation",
"alt DELETE",
MacEditorKit.deleteNextWordAction,
"alt BACK_SPACE",
MacEditorKit.deletePrevWordAction,
"ENTER",
JTextField.notifyAction,
});
// Input map for spinner editors
UIDefaults.LazyInputMap spinnerInputMap = new UIDefaults.LazyInputMap(new String[] {
| |
| File | Line |
|---|---|
| com/seaglasslookandfeel/util/MacKeybindings.java | 61 |
| com/seaglasslookandfeel/util/MacKeybindings.java | 489 |
"selection-page-right",
"RIGHT",
DefaultEditorKit.forwardAction,
"KP_RIGHT",
DefaultEditorKit.forwardAction,
"LEFT",
DefaultEditorKit.backwardAction,
"KP_LEFT",
DefaultEditorKit.backwardAction,
"shift RIGHT",
DefaultEditorKit.selectionForwardAction,
"shift KP_RIGHT",
DefaultEditorKit.selectionForwardAction,
"shift LEFT",
DefaultEditorKit.selectionBackwardAction,
"shift KP_LEFT",
DefaultEditorKit.selectionBackwardAction,
"UP",
DefaultEditorKit.upAction,
"KP_UP",
DefaultEditorKit.upAction,
"DOWN",
DefaultEditorKit.downAction,
"KP_DOWN",
DefaultEditorKit.downAction,
"shift UP",
DefaultEditorKit.selectionUpAction,
"shift KP_UP",
DefaultEditorKit.selectionUpAction,
"shift DOWN",
DefaultEditorKit.selectionDownAction,
"shift KP_DOWN",
DefaultEditorKit.selectionDownAction,
"alt LEFT",
DefaultEditorKit.previousWordAction,
"alt KP_LEFT",
DefaultEditorKit.previousWordAction,
"alt RIGHT",
DefaultEditorKit.nextWordAction,
"alt KP_RIGHT",
DefaultEditorKit.nextWordAction,
"alt shift LEFT",
DefaultEditorKit.selectionPreviousWordAction,
"alt shift KP_LEFT",
DefaultEditorKit.selectionPreviousWordAction,
"alt shift RIGHT",
DefaultEditorKit.selectionNextWordAction,
"alt shift KP_RIGHT",
DefaultEditorKit.selectionNextWordAction,
"alt UP",
DefaultEditorKit.beginLineAction,
"alt KP_UP",
DefaultEditorKit.beginLineAction,
"ctrl LEFT",
DefaultEditorKit.beginLineAction,
"ctrl KP_LEFT",
DefaultEditorKit.beginLineAction,
"meta LEFT",
DefaultEditorKit.beginLineAction,
"meta KP_LEFT",
DefaultEditorKit.beginLineAction,
"alt DOWN",
DefaultEditorKit.endLineAction,
"alt KP_DOWN",
DefaultEditorKit.endLineAction,
"ctrl RIGHT",
DefaultEditorKit.endLineAction,
"ctrl KP_RIGHT",
DefaultEditorKit.endLineAction,
"meta RIGHT",
DefaultEditorKit.endLineAction,
"meta KP_RIGHT",
DefaultEditorKit.endLineAction,
"ctrl shift LEFT",
DefaultEditorKit.selectionBeginLineAction,
"ctrl shift KP_LEFT",
DefaultEditorKit.selectionBeginLineAction,
"meta shift LEFT",
DefaultEditorKit.selectionBeginLineAction,
"meta shift KP_LEFT",
DefaultEditorKit.selectionBeginLineAction,
"ctrl shift RIGHT",
DefaultEditorKit.selectionEndLineAction,
"ctrl shift KP_RIGHT",
DefaultEditorKit.selectionEndLineAction,
"meta shift RIGHT",
DefaultEditorKit.selectionEndLineAction,
"meta shift KP_RIGHT",
DefaultEditorKit.selectionEndLineAction,
"HOME",
DefaultEditorKit.beginAction,
"END",
DefaultEditorKit.endAction,
"meta UP",
DefaultEditorKit.beginAction,
"meta KP_UP",
DefaultEditorKit.beginAction,
"meta DOWN",
DefaultEditorKit.endAction,
"meta KP_DOWN",
DefaultEditorKit.endAction,
"shift HOME",
DefaultEditorKit.selectionBeginAction,
"shift END",
DefaultEditorKit.selectionEndAction,
"meta A",
DefaultEditorKit.selectAllAction,
"meta shift A",
"unselect",
"controlBackground shift O",
"toggle-componentOrientation",
"alt DELETE",
MacEditorKit.deleteNextWordAction,
"alt BACK_SPACE",
MacEditorKit.deletePrevWordAction,
| |
| File | Line |
|---|---|
| com/seaglasslookandfeel/painter/SpinnerNextButtonPainter.java | 71 |
| com/seaglasslookandfeel/painter/SpinnerPreviousButtonPainter.java | 77 |
public SpinnerPreviousButtonPainter(Which state) {
super();
this.ctx = new PaintContext(CacheMode.FIXED_SIZES);
type = getButtonType(state);
focused = (state == Which.BACKGROUND_FOCUSED || state == Which.BACKGROUND_PRESSED_FOCUSED);
isForeground = isForeground(state);
}
@Override
protected void doPaint(Graphics2D g, JComponent c, int width, int height, Object[] extendedCacheKeys) {
if (isForeground) {
paintArrow(g, width, height);
} else {
paintButton(g, c, width, height);
}
}
@Override
protected PaintContext getPaintContext() {
return ctx;
}
private CommonControlState getButtonType(Which state) {
switch (state) {
case BACKGROUND_DISABLED:
case FOREGROUND_DISABLED:
return CommonControlState.DISABLED;
case BACKGROUND_ENABLED:
case BACKGROUND_FOCUSED:
case FOREGROUND_ENABLED:
case FOREGROUND_FOCUSED:
return CommonControlState.ENABLED;
case BACKGROUND_PRESSED_FOCUSED:
case BACKGROUND_PRESSED:
case FOREGROUND_PRESSED_FOCUSED:
case FOREGROUND_PRESSED:
return CommonControlState.PRESSED;
}
return null;
}
private boolean isForeground(Which state) {
switch (state) {
case FOREGROUND_DISABLED:
case FOREGROUND_ENABLED:
case FOREGROUND_FOCUSED:
case FOREGROUND_PRESSED_FOCUSED:
case FOREGROUND_PRESSED:
return true;
default:
return false;
}
}
private void paintButton(Graphics2D g, JComponent c, int width, int height) {
boolean useToolBarColors = isInToolBar(c);
Shape s;
if (focused) {
s = createButtonShape(0, 0, width, height, CornerSize.OUTER_FOCUS);
g.setPaint(getFocusPaint(s, FocusType.OUTER_FOCUS, useToolBarColors));
g.fill(s);
s = createButtonShape(0, 0, width - 1, height - 1, CornerSize.INNER_FOCUS);
| |
| File | Line |
|---|---|
| com/seaglasslookandfeel/util/MacKeybindings.java | 85 |
| com/seaglasslookandfeel/util/MacKeybindings.java | 357 |
"decrement",
"shift UP",
DefaultEditorKit.selectionUpAction,
"shift KP_UP",
DefaultEditorKit.selectionUpAction,
"shift DOWN",
DefaultEditorKit.selectionDownAction,
"shift KP_DOWN",
DefaultEditorKit.selectionDownAction,
"alt LEFT",
DefaultEditorKit.previousWordAction,
"alt KP_LEFT",
DefaultEditorKit.previousWordAction,
"alt RIGHT",
DefaultEditorKit.nextWordAction,
"alt KP_RIGHT",
DefaultEditorKit.nextWordAction,
"alt shift LEFT",
DefaultEditorKit.selectionPreviousWordAction,
"alt shift KP_LEFT",
DefaultEditorKit.selectionPreviousWordAction,
"alt shift RIGHT",
DefaultEditorKit.selectionNextWordAction,
"alt shift KP_RIGHT",
DefaultEditorKit.selectionNextWordAction,
"alt UP",
DefaultEditorKit.beginLineAction,
"alt KP_UP",
DefaultEditorKit.beginLineAction,
"ctrl LEFT",
DefaultEditorKit.beginLineAction,
"ctrl KP_LEFT",
DefaultEditorKit.beginLineAction,
"meta LEFT",
DefaultEditorKit.beginLineAction,
"meta KP_LEFT",
DefaultEditorKit.beginLineAction,
"alt DOWN",
DefaultEditorKit.endLineAction,
"alt KP_DOWN",
DefaultEditorKit.endLineAction,
"ctrl RIGHT",
DefaultEditorKit.endLineAction,
"ctrl KP_RIGHT",
DefaultEditorKit.endLineAction,
"meta RIGHT",
DefaultEditorKit.endLineAction,
"meta KP_RIGHT",
DefaultEditorKit.endLineAction,
"ctrl shift LEFT",
DefaultEditorKit.selectionBeginLineAction,
"ctrl shift KP_LEFT",
DefaultEditorKit.selectionBeginLineAction,
"meta shift LEFT",
DefaultEditorKit.selectionBeginLineAction,
"meta shift KP_LEFT",
DefaultEditorKit.selectionBeginLineAction,
"ctrl shift RIGHT",
DefaultEditorKit.selectionEndLineAction,
"ctrl shift KP_RIGHT",
DefaultEditorKit.selectionEndLineAction,
"meta shift RIGHT",
DefaultEditorKit.selectionEndLineAction,
"meta shift KP_RIGHT",
DefaultEditorKit.selectionEndLineAction,
"HOME",
DefaultEditorKit.beginAction,
"END",
DefaultEditorKit.endAction,
"meta UP",
DefaultEditorKit.beginAction,
"meta KP_UP",
DefaultEditorKit.beginAction,
"meta DOWN",
DefaultEditorKit.endAction,
"meta KP_DOWN",
DefaultEditorKit.endAction,
"shift HOME",
DefaultEditorKit.selectionBeginAction,
"shift END",
DefaultEditorKit.selectionEndAction,
"meta A",
DefaultEditorKit.selectAllAction,
"meta shift A",
"unselect",
"controlBackground shift O",
"toggle-componentOrientation",
"alt DELETE",
MacEditorKit.deleteNextWordAction,
"alt BACK_SPACE",
MacEditorKit.deletePrevWordAction,
"ENTER",
JTextField.notifyAction,
});
// Input map for multiline text fields
UIDefaults.LazyInputMap multilineInputMap = new UIDefaults.LazyInputMap(new String[] {
| |
| File | Line |
|---|---|
| com/seaglasslookandfeel/SeaGlassLookAndFeel.java | 1742 |
| com/seaglasslookandfeel/SeaGlassLookAndFeel.java | 1771 |
d.put(p + ".placeholderTextColor", d.get("seaGlassSearchPlaceholderText"));
d.put(p + ".background", getDerivedColor("nimbusLightBackground", 0.0f, 0.0f, 0.0f, 0, true));
d.put(p + "[Disabled].backgroundPainter", new LazyPainter(c, TextComponentPainter.Which.BACKGROUND_DISABLED));
d.put(p + "[Enabled].backgroundPainter", new LazyPainter(c, TextComponentPainter.Which.BACKGROUND_ENABLED));
d.put(p + "[Selected].backgroundPainter", new LazyPainter(c, TextComponentPainter.Which.BACKGROUND_SELECTED));
d.put(p + "[Disabled].borderPainter", new LazyPainter(c, TextComponentPainter.Which.BORDER_DISABLED));
d.put(p + "[Focused].borderPainter", new LazyPainter(c, TextComponentPainter.Which.BORDER_FOCUSED));
d.put(p + "[Enabled].borderPainter", new LazyPainter(c, TextComponentPainter.Which.BORDER_ENABLED));
// Paint with SearchFieldPainter.
d.put(p + "[Disabled+SearchField].backgroundPainter", new LazyPainter(cs, SearchFieldPainter.Which.BACKGROUND_DISABLED));
d.put(p + "[Enabled+SearchField].backgroundPainter", new LazyPainter(cs, SearchFieldPainter.Which.BACKGROUND_ENABLED));
d.put(p + "[Selected+SearchField].backgroundPainter", new LazyPainter(cs, SearchFieldPainter.Which.BACKGROUND_SELECTED));
d.put(p + "[Disabled+SearchField].borderPainter", new LazyPainter(cs, SearchFieldPainter.Which.BORDER_DISABLED));
d.put(p + "[Focused+SearchField].borderPainter", new LazyPainter(cs, SearchFieldPainter.Which.BORDER_FOCUSED));
d.put(p + "[Enabled+SearchField].borderPainter", new LazyPainter(cs, SearchFieldPainter.Which.BORDER_ENABLED));
// Initialize PasswordField
p = "PasswordField";
| |
| File | Line |
|---|---|
| com/seaglasslookandfeel/SeaGlassStyle.java | 863 |
| com/seaglasslookandfeel/SeaGlassStyleWrapper.java | 140 |
}
/**
* {@inheritDoc}
*/
@Override
protected Font getFontForState(SynthContext ctx) {
Font f = (Font) get(ctx, "font");
if (f == null)
f = UIManager.getFont("defaultFont");
// Account for scale
// The key "JComponent.sizeVariant" is used to match Apple's LAF
String scaleKey = (String) ctx.getComponent().getClientProperty("JComponent.sizeVariant");
if (scaleKey != null) {
if (LARGE_KEY.equals(scaleKey)) {
f = f.deriveFont(Math.round(f.getSize2D() * LARGE_SCALE));
} else if (SMALL_KEY.equals(scaleKey)) {
f = f.deriveFont(Math.round(f.getSize2D() * SMALL_SCALE));
} else if (MINI_KEY.equals(scaleKey)) {
f = f.deriveFont(Math.round(f.getSize2D() * MINI_SCALE));
}
}
return f;
}
/**
* {@inheritDoc}
*/
@Override
public SynthPainter getPainter(SynthContext ctx) {
return painter;
}
/**
* {@inheritDoc}
*/
@Override
public boolean isOpaque(SynthContext ctx) {
| |
| File | Line |
|---|---|
| com/seaglasslookandfeel/component/SeaGlassInternalFrameTitlePane.java | 274 |
| com/seaglasslookandfeel/component/SeaGlassTitlePane.java | 432 |
}
/**
* Update the Synth Style.
*
* @param c the title pane.
*/
private void updateStyle(JComponent c) {
SeaGlassContext context = getContext(this, ENABLED);
SynthStyle oldStyle = style;
style = SeaGlassLookAndFeel.updateStyle(context, this);
if (style != oldStyle) {
titleSpacing = style.getInt(context, "InternalFrameTitlePane.titleSpacing", 2);
}
context.dispose();
}
/**
* Create the buttons.
*/
private void createButtons() {
iconButton = new NoFocusButton("InternalFrameTitlePane.iconifyButtonAccessibleName");
iconButton.addActionListener(iconifyAction);
if (iconButtonToolTip != null && iconButtonToolTip.length() != 0) {
iconButton.setToolTipText(iconButtonToolTip);
}
maxButton = new NoFocusButton("InternalFrameTitlePane.maximizeButtonAccessibleName");
maxButton.addActionListener(maximizeAction);
closeButton = new NoFocusButton("InternalFrameTitlePane.closeButtonAccessibleName");
closeButton.addActionListener(closeAction);
if (closeButtonToolTip != null && closeButtonToolTip.length() != 0) {
closeButton.setToolTipText(closeButtonToolTip);
}
setButtonTooltips();
}
/**
* Set the tooltips for the buttons.
*/
private void setButtonTooltips() {
if (isParentIcon()) {
| |
| File | Line |
|---|---|
| com/seaglasslookandfeel/painter/CheckBoxMenuItemPainter.java | 58 |
| com/seaglasslookandfeel/painter/RadioButtonMenuItemPainter.java | 48 |
public RadioButtonMenuItemPainter(Which state) {
super(MenuItemPainter.Which.BACKGROUND_ENABLED);
this.state = state;
switch (state) {
case BACKGROUND_DISABLED:
case BACKGROUND_ENABLED:
case BACKGROUND_MOUSEOVER:
case BACKGROUND_SELECTED_MOUSEOVER:
this.ctx = new PaintContext(CacheMode.NO_CACHING);
break;
default:
this.ctx = new PaintContext(CacheMode.FIXED_SIZES);
break;
}
}
@Override
protected void doPaint(Graphics2D g, JComponent c, int width, int height, Object[] extendedCacheKeys) {
switch (state) {
case BACKGROUND_MOUSEOVER:
paintBackgroundMouseOver(g, width, height);
break;
case BACKGROUND_SELECTED_MOUSEOVER:
paintBackgroundMouseOver(g, width, height);
break;
case CHECKICON_DISABLED_SELECTED:
paintCheckIconDisabledAndSelected(g, width, height);
break;
case CHECKICON_ENABLED_SELECTED:
paintCheckIconEnabledAndSelected(g, width, height);
break;
case CHECKICON_SELECTED_MOUSEOVER:
paintCheckIconSelectedAndMouseOver(g, width, height);
break;
}
}
@Override
protected final PaintContext getPaintContext() {
| |
| File | Line |
|---|---|
| com/seaglasslookandfeel/painter/util/ShapeGenerator.java | 577 |
| com/seaglasslookandfeel/painter/util/ShapeGenerator.java | 617 |
path.moveTo(xMid, yMid - offsetC);
path.lineTo(xMid + xOffsetS, yMid - yOffsetL);
path.lineTo(yMid + xOffsetL, yMid - yOffsetS);
path.lineTo(xMid + offsetC, yMid);
path.lineTo(xMid + xOffsetL, yMid + yOffsetS);
path.lineTo(xMid + xOffsetS, yMid + yOffsetL);
path.lineTo(xMid, yMid + offsetC);
path.lineTo(xMid - xOffsetS, yMid + yOffsetL);
path.lineTo(xMid - xOffsetL, yMid + yOffsetS);
path.lineTo(xMid - offsetC, yMid);
path.lineTo(xMid - xOffsetL, yMid - yOffsetS);
path.lineTo(xMid - xOffsetS, yMid - yOffsetL);
path.closePath();
return path;
}
/**
* Return a path for a scroll bar cap. This is used when the buttons are
* placed together at the opposite end of the scroll bar.
*
* @param x the X coordinate of the upper-left corner of the cap
* @param y the Y coordinate of the upper-left corner of the cap
* @param w the width of the cap
* @param h the height of the cap
*
* @return a path representing the shape.
*/
public Shape createScrollCap(int x, int y, int w, int h) {
| |
| File | Line |
|---|---|
| com/seaglasslookandfeel/painter/TitlePaneIconifyButtonPainter.java | 196 |
| com/seaglasslookandfeel/painter/TitlePaneMaximizeButtonPainter.java | 198 |
maximizePainter.paintPressed(g, c, width, height);
}
/**
* Paint the foreground restore button enabled state.
*
* @param g the Graphics2D context to paint with.
* @param c the component.
* @param width the width of the component.
* @param height the height of the component.
*/
private void paintRestoreEnabled(Graphics2D g, JComponent c, int width, int height) {
restorePainter.paintEnabled(g, c, width, height);
}
/**
* Paint the foreground restore button mouse-over state.
*
* @param g the Graphics2D context to paint with.
* @param c the component.
* @param width the width of the component.
* @param height the height of the component.
*/
private void paintRestoreHover(Graphics2D g, JComponent c, int width, int height) {
restorePainter.paintHover(g, c, width, height);
}
/**
* Paint the foreground restore button pressed state.
*
* @param g the Graphics2D context to paint with.
* @param c the component.
* @param width the width of the component.
* @param height the height of the component.
*/
private void paintRestorePressed(Graphics2D g, JComponent c, int width, int height) {
restorePainter.paintPressed(g, c, width, height);
}
/**
* Paint the background of the button using the specified colors.
*
* @param g the Graphics2D context to paint with.
* @param c the component.
* @param width the width of the component.
* @param height the height of the component.
* @param colors the color set to use to paint the button.
*/
private void paintBackground(Graphics2D g, JComponent c, int width, int height, ButtonColors colors) {
g.setRenderingHint(RenderingHints.KEY_ANTIALIASING, RenderingHints.VALUE_ANTIALIAS_OFF);
g.setColor(colors.top);
g.drawLine(0, 0, width - 2, 0);
| |
| File | Line |
|---|---|
| com/seaglasslookandfeel/component/SeaGlassInternalFrameTitlePane.java | 577 |
| com/seaglasslookandfeel/component/SeaGlassTitlePane.java | 727 |
}
if (prop == JInternalFrame.IS_ICON_PROPERTY || prop == JInternalFrame.IS_MAXIMUM_PROPERTY) {
setButtonTooltips();
enableActions();
return;
}
if ("closable" == prop) {
if ((Boolean) evt.getNewValue() == Boolean.TRUE) {
add(closeButton);
} else {
remove(closeButton);
}
} else if ("maximizable" == prop) {
if ((Boolean) evt.getNewValue() == Boolean.TRUE) {
add(maxButton);
} else {
remove(maxButton);
}
} else if ("iconable" == prop) {
if ((Boolean) evt.getNewValue() == Boolean.TRUE) {
add(iconButton);
} else {
remove(iconButton);
}
}
enableActions();
revalidate();
repaint();
}
/**
* Sets the state of the window. If <code>updateRegardless</code> is true
* and the state has not changed, this will update anyway.
*
* @param state the state of the window.
* @param updateRegardless {@code true} if we are to update regardless of
* the state, {@code false} otherwise.
*/
private void setState(int state, boolean updateRegardless) {
| |
| File | Line |
|---|---|
| com/seaglasslookandfeel/SeaGlassSynthPainterImpl.java | 1978 |
| com/seaglasslookandfeel/SeaGlassSynthPainterImpl.java | 2070 |
public void paintTabbedPaneTabBackground(SynthContext context, Graphics g, int x, int y, int w, int h, int tabIndex, int orientation) {
if (orientation == JTabbedPane.LEFT) {
AffineTransform transform = new AffineTransform();
transform.scale(-1, 1);
transform.rotate(Math.toRadians(90));
paintBackground(context, g, y, x, h, w, transform);
} else if (orientation == JTabbedPane.RIGHT) {
AffineTransform transform = new AffineTransform();
transform.rotate(Math.toRadians(90));
transform.translate(0, -(x + w));
paintBackground(context, g, y, 0, h, w, transform);
} else if (orientation == JTabbedPane.BOTTOM) {
AffineTransform transform = new AffineTransform();
transform.translate(x, y);
| |
| File | Line |
|---|---|
| com/seaglasslookandfeel/component/SeaGlassInternalFrameTitlePane.java | 528 |
| com/seaglasslookandfeel/component/SeaGlassTitlePane.java | 656 |
return SwingUtilities2.clipStringIfNecessary(rootPane, fm, text, availTextWidth);
}
/**
* @see sun.swing.plaf.synth.SynthUI#paintBorder(javax.swing.plaf.synth.SynthContext,
* java.awt.Graphics, int, int, int, int)
*/
public void paintBorder(SynthContext context, Graphics g, int x, int y, int w, int h) {
((SeaGlassContext) context).getPainter().paintInternalFrameTitlePaneBorder(context, g, x, y, w, h);
}
/**
* Create the layout manager for the title pane.
*
* @return the layout manager.
*/
private LayoutManager createLayout() {
SeaGlassContext context = getContext(this);
LayoutManager lm = (LayoutManager) style.get(context, "InternalFrameTitlePane.titlePaneLayout");
context.dispose();
return (lm != null) ? lm : new SeaGlassTitlePaneLayout();
}
/**
* @see java.beans.PropertyChangeListener#propertyChange(java.beans.PropertyChangeEvent)
*/
public void propertyChange(PropertyChangeEvent evt) {
if (evt.getSource() == this) {
if (SeaGlassLookAndFeel.shouldUpdateStyle(evt)) {
updateStyle(this);
}
}
| |
| File | Line |
|---|---|
| com/seaglasslookandfeel/painter/TitlePaneIconifyButtonPainter.java | 112 |
| com/seaglasslookandfeel/painter/TitlePaneMaximizeButtonPainter.java | 114 |
case BACKGROUND_MAXIMIZED_PRESSED_WINDOWNOTFOCUSED:
paintBackgroundPressed(g, c, width, height);
paintRestorePressed(g, c, width, height);
break;
}
}
/**
* {@inheritDoc}
*/
@Override
protected PaintContext getPaintContext() {
return ctx;
}
/**
* Paint the background enabled state.
*
* @param g the Graphics2D context to paint with.
* @param c the component.
* @param width the width of the component.
* @param height the height of the component.
*/
private void paintBackgroundEnabled(Graphics2D g, JComponent c, int width, int height) {
paintBackground(g, c, width, height, enabled);
}
/**
* Paint the background mouse-over state.
*
* @param g the Graphics2D context to paint with.
* @param c the component.
* @param width the width of the component.
* @param height the height of the component.
*/
private void paintBackgroundHover(Graphics2D g, JComponent c, int width, int height) {
paintBackground(g, c, width, height, hover);
}
/**
* Paint the background pressed state.
*
* @param g the Graphics2D context to paint with.
* @param c the component.
* @param width the width of the component.
* @param height the height of the component.
*/
private void paintBackgroundPressed(Graphics2D g, JComponent c, int width, int height) {
paintBackground(g, c, width, height, pressed);
}
/**
* Paint the foreground maximized button enabled state.
*
* @param g the Graphics2D context to paint with.
* @param c the component.
* @param width the width of the component.
* @param height the height of the component.
*/
private void paintMaximizeEnabled(Graphics2D g, JComponent c, int width, int height) {
| |
| File | Line |
|---|---|
| com/seaglasslookandfeel/component/SeaGlassInternalFrameTitlePane.java | 761 |
| com/seaglasslookandfeel/component/SeaGlassTitlePane.java | 930 |
height = Math.max(fm.getHeight(), height);
width += titleSpacing + titleSpacing;
Insets insets = getInsets();
height += insets.top + insets.bottom;
width += insets.left + insets.right;
context.dispose();
return new Dimension(width, height);
}
/**
* Determine the position of a button.
*
* @param c the button.
* @param insets the title pane insets.
* @param x the x position of the button.
* @param trailing Are we at the right edge?
*
* @return the modified x position for the button.
*/
private int center(Component c, Insets insets, int x, boolean trailing) {
Dimension pref = c.getPreferredSize();
int width = pref.width;
if (c instanceof JButton && ((JButton) c).getIcon() != null) {
width = ((JButton) c).getIcon().getIconWidth();
}
if (trailing) {
x -= width;
}
int y = 1;
| |
| File | Line |
|---|---|
| com/seaglasslookandfeel/util/MacKeybindings.java | 45 |
| com/seaglasslookandfeel/util/MacKeybindings.java | 317 |
UIDefaults.LazyInputMap spinnerInputMap = new UIDefaults.LazyInputMap(new String[] {
"BACK_SPACE",
DefaultEditorKit.deletePrevCharAction,
"DELETE",
DefaultEditorKit.deleteNextCharAction,
"meta X",
DefaultEditorKit.cutAction,
"meta C",
DefaultEditorKit.copyAction,
"meta V",
DefaultEditorKit.pasteAction,
"CUT",
DefaultEditorKit.cutAction,
"COPY",
DefaultEditorKit.copyAction,
"PASTE",
DefaultEditorKit.pasteAction,
"RIGHT",
DefaultEditorKit.forwardAction,
"KP_RIGHT",
DefaultEditorKit.forwardAction,
"LEFT",
DefaultEditorKit.backwardAction,
"KP_LEFT",
DefaultEditorKit.backwardAction,
"shift RIGHT",
DefaultEditorKit.selectionForwardAction,
"shift KP_RIGHT",
DefaultEditorKit.selectionForwardAction,
"shift LEFT",
DefaultEditorKit.selectionBackwardAction,
"shift KP_LEFT",
DefaultEditorKit.selectionBackwardAction,
"UP",
| |
| File | Line |
|---|---|
| com/seaglasslookandfeel/ui/SeaGlassDesktopIconUI.java | 142 |
| com/seaglasslookandfeel/ui/SeaGlassDesktopPaneUI.java | 417 |
context.getPainter().paintPopupMenuBackground(context, g, 0, 0, c.getWidth(), c.getHeight());
paint(context, g);
context.dispose();
}
public void paint(Graphics g, JComponent c) {
SeaGlassContext context = getContext(c);
paint(context, g);
context.dispose();
}
protected void paint(SeaGlassContext context, Graphics g) {
}
public void paintBorder(SynthContext context, Graphics g, int x, int y, int w, int h) {
((SeaGlassContext) context).getPainter().paintPopupMenuBorder(context, g, x, y, w, h);
| |
| File | Line |
|---|---|
| com/seaglasslookandfeel/SeaGlassSynthPainterImpl.java | 769 |
| com/seaglasslookandfeel/SeaGlassSynthPainterImpl.java | 2319 |
public void paintTextFieldBorder(SynthContext context, Graphics g, int x, int y, int w, int h) {
if (context.getComponent().getComponentOrientation().isLeftToRight()) {
paintBorder(context, g, x, y, w, h, null);
} else {
AffineTransform transform = new AffineTransform();
transform.translate(x, y);
transform.scale(-1, 1);
transform.translate(-w, 0);
paintBorder(context, g, 0, 0, w, h, transform);
}
}
/**
* Paints the background of a toggle button.
*
* @param context SynthContext identifying the <code>JComponent</code> and
* <code>Region</code> to paint to
* @param g <code>Graphics</code> to paint to
* @param x X coordinate of the area to paint to
* @param y Y coordinate of the area to paint to
* @param w Width of the area to paint to
* @param h Height of the area to paint to
*/
public void paintToggleButtonBackground(SynthContext context, Graphics g, int x, int y, int w, int h) {
| |
| File | Line |
|---|---|
| com/seaglasslookandfeel/SeaGlassSynthPainterImpl.java | 333 |
| com/seaglasslookandfeel/SeaGlassSynthPainterImpl.java | 2295 |
public void paintTextFieldBackground(SynthContext context, Graphics g, int x, int y, int w, int h) {
if (context.getComponent().getComponentOrientation().isLeftToRight()) {
paintBackground(context, g, x, y, w, h, null);
} else {
AffineTransform transform = new AffineTransform();
transform.translate(x, y);
transform.scale(-1, 1);
transform.translate(-w, 0);
paintBackground(context, g, 0, 0, w, h, transform);
}
}
/**
* Paints the border of a text field.
*
* @param context SynthContext identifying the <code>JComponent</code> and
* <code>Region</code> to paint to
* @param g <code>Graphics</code> to paint to
* @param x X coordinate of the area to paint to
* @param y Y coordinate of the area to paint to
* @param w Width of the area to paint to
* @param h Height of the area to paint to
*/
public void paintTextFieldBorder(SynthContext context, Graphics g, int x, int y, int w, int h) {
| |
| File | Line |
|---|---|
| com/seaglasslookandfeel/ui/SeaGlassToolBarUI.java | 260 |
| com/seaglasslookandfeel/ui/SeaGlassToolBarUI.java | 296 |
public Dimension preferredLayoutSize(Container parent) {
JToolBar tb = (JToolBar) parent;
Insets insets = tb.getInsets();
Dimension dim = new Dimension();
SeaGlassContext context = getContext(tb);
if (tb.getOrientation() == JToolBar.HORIZONTAL) {
dim.width = tb.isFloatable() ? SynthIcon.getIconWidth(handleIcon, context) : 0;
Dimension compDim;
for (int i = 0; i < tb.getComponentCount(); i++) {
Component component = tb.getComponent(i);
if (component.isVisible()) {
compDim = component.getPreferredSize();
| |
| File | Line |
|---|---|
| com/seaglasslookandfeel/util/MacKeybindings.java | 45 |
| com/seaglasslookandfeel/util/MacKeybindings.java | 607 |
UIDefaults.LazyInputMap comboEditorInputMap = new UIDefaults.LazyInputMap(new String[] {
"BACK_SPACE",
DefaultEditorKit.deletePrevCharAction,
"DELETE",
DefaultEditorKit.deleteNextCharAction,
"meta X",
DefaultEditorKit.cutAction,
"meta C",
DefaultEditorKit.copyAction,
"meta V",
DefaultEditorKit.pasteAction,
"CUT",
DefaultEditorKit.cutAction,
"COPY",
DefaultEditorKit.copyAction,
"PASTE",
DefaultEditorKit.pasteAction,
"RIGHT",
DefaultEditorKit.forwardAction,
"KP_RIGHT",
DefaultEditorKit.forwardAction,
"LEFT",
DefaultEditorKit.backwardAction,
"KP_LEFT",
DefaultEditorKit.backwardAction,
"shift RIGHT",
DefaultEditorKit.selectionForwardAction,
"shift KP_RIGHT",
DefaultEditorKit.selectionForwardAction,
"shift LEFT",
DefaultEditorKit.selectionBackwardAction,
"shift KP_LEFT",
DefaultEditorKit.selectionBackwardAction,
| |
| File | Line |
|---|---|
| com/seaglasslookandfeel/component/SeaGlassInternalFrameTitlePane.java | 747 |
| com/seaglasslookandfeel/component/SeaGlassTitlePane.java | 916 |
String frameTitle = getTitle();
int title_w = frameTitle != null ? graphicsUtils.computeStringWidth(context, fm.getFont(), fm, frameTitle)
: 0;
int title_length = frameTitle != null ? frameTitle.length() : 0;
// Leave room for three characters in the title.
if (title_length > 3) {
int subtitle_w = graphicsUtils.computeStringWidth(context, fm.getFont(), fm, frameTitle.substring(0, 3) + "...");
width += (title_w < subtitle_w) ? title_w : subtitle_w;
} else {
width += title_w;
}
height = Math.max(fm.getHeight(), height);
| |
| File | Line |
|---|---|
| com/seaglasslookandfeel/SeaGlassLookAndFeel.java | 619 |
| com/seaglasslookandfeel/SeaGlassLookAndFeel.java | 1642 |
d.put(p + ".States", "Enabled,Pressed,Disabled");
d.put(p + "[Disabled].foreground", new ColorUIResource(0x9ba8cf));
d.put(p + "[Enabled].foreground", new ColorUIResource(Color.BLACK));
d.put(p + "[Pressed].foreground", new ColorUIResource(0x134D8C));
d.put(p + "[Disabled].foregroundPainter", new LazyPainter(c, ArrowButtonPainter.Which.FOREGROUND_DISABLED));
d.put(p + "[Enabled].foregroundPainter", new LazyPainter(c, ArrowButtonPainter.Which.FOREGROUND_ENABLED));
d.put(p + "[Pressed].foregroundPainter", new LazyPainter(c, ArrowButtonPainter.Which.FOREGROUND_PRESSED));
| |
| File | Line |
|---|---|
| com/seaglasslookandfeel/ui/SeaGlassScrollBarUI.java | 523 |
| com/seaglasslookandfeel/ui/SeaGlassScrollBarUI.java | 553 |
trackRect.setBounds(lv.trackPosition, lv.itemEdge, lv.trackLength, lv.itemThickness);
decrButton.setBounds(lv.decrButtonPosition, lv.itemEdge, lv.decrButtonLength, lv.itemThickness);
incrButton.setBounds(lv.incrButtonPosition, lv.itemEdge, lv.incrButtonLength, lv.itemThickness);
if (lv.thumbLength > 0) {
setThumbBounds(lv.thumbPosition, lv.itemEdge, lv.thumbLength, lv.itemThickness);
} else {
setThumbBounds(0, 0, 0, 0);
}
}
/**
* Holds scrollbar layout values in an orientation-independent way.
*/
private class ScrollbarLayoutValues {
| |
| File | Line |
|---|---|
| com/seaglasslookandfeel/painter/TabbedPaneTabPainter.java | 124 |
| com/seaglasslookandfeel/painter/button/SegmentedButtonPainter.java | 82 |
width -= focusInsets.left + focusInsets.right;
height -= focusInsets.top + focusInsets.bottom;
boolean useToolBarFocus = isInToolBar(c);
Shape s;
if (focused) {
s = createOuterFocus(segmentStatus, x, y, width, height);
g.setPaint(getFocusPaint(s, FocusType.OUTER_FOCUS, useToolBarFocus));
g.draw(s);
s = createInnerFocus(segmentStatus, x, y, width, height);
g.setPaint(getFocusPaint(s, FocusType.INNER_FOCUS, useToolBarFocus));
g.draw(s);
}
| |
| File | Line |
|---|---|
| com/seaglasslookandfeel/ui/SeaGlassDesktopPaneUI.java | 399 |
| com/seaglasslookandfeel/ui/SeaGlassPanelUI.java | 136 |
}
/**
* @see sun.swing.plaf.synth.SynthUI#getContext(javax.swing.JComponent)
*/
public SeaGlassContext getContext(JComponent c) {
return getContext(c, getComponentState(c));
}
/**
* Get the Synth context.
*
* @param c the panel.
* @param state the Synth state.
*
* @return the context.
*/
private SeaGlassContext getContext(JComponent c, int state) {
return SeaGlassContext.getContext(SeaGlassContext.class, c, SeaGlassLookAndFeel.getRegion(c), style, state);
}
/**
* Get the Synth state of the panel.
*
* @param c the panel.
*
* @return the state.
*/
private int getComponentState(JComponent c) {
return SeaGlassLookAndFeel.getComponentState(c);
}
/**
* @see javax.swing.plaf.ComponentUI#update(java.awt.Graphics, javax.swing.JComponent)
*/
public void update(Graphics g, JComponent c) {
SeaGlassContext context = getContext(c);
SeaGlassLookAndFeel.update(context, g);
context.getPainter().paintPanelBackground(context, g, 0, 0, c.getWidth(), c.getHeight());
| |
| File | Line |
|---|---|
| com/seaglasslookandfeel/component/SeaGlassInternalFrameTitlePane.java | 195 |
| com/seaglasslookandfeel/component/SeaGlassTitlePane.java | 360 |
closeButton.setName("InternalFrameTitlePane.closeButton");
add(iconButton);
add(maxButton);
add(closeButton);
}
/**
* Create actions for the buttons.
*/
private void createActions() {
maximizeAction = new MaximizeAction();
iconifyAction = new IconifyAction();
closeAction = new CloseAction();
restoreAction = new RestoreAction();
moveAction = new MoveAction();
sizeAction = new SizeAction();
}
/**
* Create the action map for the system menu.
*
* @return the action map.
*/
ActionMap createActionMap() {
ActionMap map = new ActionMapUIResource();
map.put("showSystemMenu", new ShowSystemMenuAction(true));
map.put("hideSystemMenu", new ShowSystemMenuAction(false));
return map;
}
/**
* Install listeners.
*/
protected void installListeners() {
| |
| File | Line |
|---|---|
| com/seaglasslookandfeel/SeaGlassLookAndFeel.java | 664 |
| com/seaglasslookandfeel/SeaGlassLookAndFeel.java | 677 |
d.put(p + "[Disabled+Selected].textForeground", new ColorUIResource(new Color(0, 0, 0, 0x80)));
d.put(p + "[Disabled].backgroundPainter", new LazyPainter(c, ButtonPainter.Which.BACKGROUND_DISABLED));
d.put(p + "[Enabled].backgroundPainter", new LazyPainter(c, ButtonPainter.Which.BACKGROUND_ENABLED));
d.put(p + "[Focused].backgroundPainter", new LazyPainter(c, ButtonPainter.Which.BACKGROUND_FOCUSED));
d.put(p + "[Pressed].backgroundPainter", new LazyPainter(c, ButtonPainter.Which.BACKGROUND_PRESSED));
d.put(p + "[Focused+Pressed].backgroundPainter",
new LazyPainter(c, ButtonPainter.Which.BACKGROUND_PRESSED_FOCUSED));
| |
| File | Line |
|---|---|
| com/seaglasslookandfeel/SeaGlassLookAndFeel.java | 664 |
| com/seaglasslookandfeel/SeaGlassLookAndFeel.java | 1894 |
d.put(p + ".States", "Enabled,Disabled,Focused,Pressed");
d.put(p + "[Disabled].backgroundPainter", new LazyPainter(c, ButtonPainter.Which.BACKGROUND_DISABLED));
d.put(p + "[Enabled].backgroundPainter", new LazyPainter(c, ButtonPainter.Which.BACKGROUND_ENABLED));
d.put(p + "[Focused].backgroundPainter", new LazyPainter(c, ButtonPainter.Which.BACKGROUND_FOCUSED));
d.put(p + "[Pressed].backgroundPainter", new LazyPainter(c, ButtonPainter.Which.BACKGROUND_PRESSED));
d.put(p + "[Focused+Pressed].backgroundPainter", new LazyPainter(c, ButtonPainter.Which.BACKGROUND_PRESSED_FOCUSED));
| |