id
int32
0
165k
repo
stringlengths
7
58
path
stringlengths
12
218
func_name
stringlengths
3
140
original_string
stringlengths
73
34.1k
language
stringclasses
1 value
code
stringlengths
73
34.1k
code_tokens
list
docstring
stringlengths
3
16k
docstring_tokens
list
sha
stringlengths
40
40
url
stringlengths
105
339
700
khuxtable/seaglass
src/main/java/com/seaglasslookandfeel/ui/SeaGlassTabbedPaneUI.java
SeaGlassTabbedPaneUI.updateTabContext
private void updateTabContext(int index, boolean selected, boolean isMouseDown, boolean isMouseOver, boolean hasFocus) { int state = 0; if (!tabPane.isEnabled() || !tabPane.isEnabledAt(index)) { state |= SynthConstants.DISABLED; if (selected) { state |= SynthCon...
java
private void updateTabContext(int index, boolean selected, boolean isMouseDown, boolean isMouseOver, boolean hasFocus) { int state = 0; if (!tabPane.isEnabled() || !tabPane.isEnabledAt(index)) { state |= SynthConstants.DISABLED; if (selected) { state |= SynthCon...
[ "private", "void", "updateTabContext", "(", "int", "index", ",", "boolean", "selected", ",", "boolean", "isMouseDown", ",", "boolean", "isMouseOver", ",", "boolean", "hasFocus", ")", "{", "int", "state", "=", "0", ";", "if", "(", "!", "tabPane", ".", "isEn...
Update the SynthContext for the tab area for a specified tab. @param index the tab to update for. @param selected is the tab selected? @param isMouseDown is the mouse down? @param isMouseOver is the mouse over the tab? @param hasFocus do we have focus?
[ "Update", "the", "SynthContext", "for", "the", "tab", "area", "for", "a", "specified", "tab", "." ]
f25ecba622923d7b29b64cb7d6068dd8005989b3
https://github.com/khuxtable/seaglass/blob/f25ecba622923d7b29b64cb7d6068dd8005989b3/src/main/java/com/seaglasslookandfeel/ui/SeaGlassTabbedPaneUI.java#L1078-L1109
701
khuxtable/seaglass
src/main/java/com/seaglasslookandfeel/ui/SeaGlassTabbedPaneUI.java
SeaGlassTabbedPaneUI.isOverCloseButton
protected boolean isOverCloseButton(int x, int y) { if (tabCloseButtonPlacement != CENTER) { int tabCount = tabPane.getTabCount(); for (int i = 0; i < tabCount; i++) { if (getCloseButtonBounds(i).contains(x, y)) { closeButtonHoverIndex = i; ...
java
protected boolean isOverCloseButton(int x, int y) { if (tabCloseButtonPlacement != CENTER) { int tabCount = tabPane.getTabCount(); for (int i = 0; i < tabCount; i++) { if (getCloseButtonBounds(i).contains(x, y)) { closeButtonHoverIndex = i; ...
[ "protected", "boolean", "isOverCloseButton", "(", "int", "x", ",", "int", "y", ")", "{", "if", "(", "tabCloseButtonPlacement", "!=", "CENTER", ")", "{", "int", "tabCount", "=", "tabPane", ".", "getTabCount", "(", ")", ";", "for", "(", "int", "i", "=", ...
Determine whether the mouse is over a tab close button, and if so, set the hover index. @param x the current mouse x coordinate. @param y the current mouse y coordinate. @return {@code true} if the mouse is over a close button, {@code false} otherwise.
[ "Determine", "whether", "the", "mouse", "is", "over", "a", "tab", "close", "button", "and", "if", "so", "set", "the", "hover", "index", "." ]
f25ecba622923d7b29b64cb7d6068dd8005989b3
https://github.com/khuxtable/seaglass/blob/f25ecba622923d7b29b64cb7d6068dd8005989b3/src/main/java/com/seaglasslookandfeel/ui/SeaGlassTabbedPaneUI.java#L1121-L1135
702
khuxtable/seaglass
src/main/java/com/seaglasslookandfeel/ui/SeaGlassTabbedPaneUI.java
SeaGlassTabbedPaneUI.getCloseButtonBounds
protected Rectangle getCloseButtonBounds(int tabIndex) { Rectangle bounds = new Rectangle(rects[tabIndex]); bounds.width = closeButtonSize; bounds.height = closeButtonSize; bounds.y += (rects[tabIndex].height - closeButtonSize - closeButtonInsets.top - closeButtonInsets.bottom) / 2 ...
java
protected Rectangle getCloseButtonBounds(int tabIndex) { Rectangle bounds = new Rectangle(rects[tabIndex]); bounds.width = closeButtonSize; bounds.height = closeButtonSize; bounds.y += (rects[tabIndex].height - closeButtonSize - closeButtonInsets.top - closeButtonInsets.bottom) / 2 ...
[ "protected", "Rectangle", "getCloseButtonBounds", "(", "int", "tabIndex", ")", "{", "Rectangle", "bounds", "=", "new", "Rectangle", "(", "rects", "[", "tabIndex", "]", ")", ";", "bounds", ".", "width", "=", "closeButtonSize", ";", "bounds", ".", "height", "=...
Get the bounds for a tab close button. @param tabIndex the tab index. @return the bounds.
[ "Get", "the", "bounds", "for", "a", "tab", "close", "button", "." ]
f25ecba622923d7b29b64cb7d6068dd8005989b3
https://github.com/khuxtable/seaglass/blob/f25ecba622923d7b29b64cb7d6068dd8005989b3/src/main/java/com/seaglasslookandfeel/ui/SeaGlassTabbedPaneUI.java#L1144-L1166
703
khuxtable/seaglass
src/main/java/com/seaglasslookandfeel/ui/SeaGlassTabbedPaneUI.java
SeaGlassTabbedPaneUI.doClose
protected void doClose(int tabIndex) { if (tabCloseListener == null || tabCloseListener.tabAboutToBeClosed(tabIndex)) { String title = tabPane.getTitleAt(tabIndex); Component component = tabPane.getComponentAt(tabIndex); tabPane.removeTabAt(tabIndex); if ...
java
protected void doClose(int tabIndex) { if (tabCloseListener == null || tabCloseListener.tabAboutToBeClosed(tabIndex)) { String title = tabPane.getTitleAt(tabIndex); Component component = tabPane.getComponentAt(tabIndex); tabPane.removeTabAt(tabIndex); if ...
[ "protected", "void", "doClose", "(", "int", "tabIndex", ")", "{", "if", "(", "tabCloseListener", "==", "null", "||", "tabCloseListener", ".", "tabAboutToBeClosed", "(", "tabIndex", ")", ")", "{", "String", "title", "=", "tabPane", ".", "getTitleAt", "(", "ta...
Called when a close tab button is pressed. @param tabIndex TODO
[ "Called", "when", "a", "close", "tab", "button", "is", "pressed", "." ]
f25ecba622923d7b29b64cb7d6068dd8005989b3
https://github.com/khuxtable/seaglass/blob/f25ecba622923d7b29b64cb7d6068dd8005989b3/src/main/java/com/seaglasslookandfeel/ui/SeaGlassTabbedPaneUI.java#L1184-L1195
704
khuxtable/seaglass
src/main/java/com/seaglasslookandfeel/painter/CheckBoxMenuItemPainter.java
CheckBoxMenuItemPainter.paintCheckIconDisabledAndSelected
private void paintCheckIconDisabledAndSelected(Graphics2D g, int width, int height) { Shape s = shapeGenerator.createCheckMark(0, 0, width, height); g.setPaint(iconDisabledSelected); g.fill(s); }
java
private void paintCheckIconDisabledAndSelected(Graphics2D g, int width, int height) { Shape s = shapeGenerator.createCheckMark(0, 0, width, height); g.setPaint(iconDisabledSelected); g.fill(s); }
[ "private", "void", "paintCheckIconDisabledAndSelected", "(", "Graphics2D", "g", ",", "int", "width", ",", "int", "height", ")", "{", "Shape", "s", "=", "shapeGenerator", ".", "createCheckMark", "(", "0", ",", "0", ",", "width", ",", "height", ")", ";", "g"...
Paint the check mark in disabled state. @param g the Graphics2D context to paint with. @param width the width. @param height the height.
[ "Paint", "the", "check", "mark", "in", "disabled", "state", "." ]
f25ecba622923d7b29b64cb7d6068dd8005989b3
https://github.com/khuxtable/seaglass/blob/f25ecba622923d7b29b64cb7d6068dd8005989b3/src/main/java/com/seaglasslookandfeel/painter/CheckBoxMenuItemPainter.java#L132-L138
705
khuxtable/seaglass
src/main/java/com/seaglasslookandfeel/SeaGlassLookAndFeel.java
SeaGlassLookAndFeel.initialize
@Override public void initialize() { super.initialize(); // create synth style factory setStyleFactory(new SynthStyleFactory() { @Override public SynthStyle getStyle(JComponent c, Region r) { SynthStyle style = getSeaGlassStyle(c, r); ...
java
@Override public void initialize() { super.initialize(); // create synth style factory setStyleFactory(new SynthStyleFactory() { @Override public SynthStyle getStyle(JComponent c, Region r) { SynthStyle style = getSeaGlassStyle(c, r); ...
[ "@", "Override", "public", "void", "initialize", "(", ")", "{", "super", ".", "initialize", "(", ")", ";", "// create synth style factory", "setStyleFactory", "(", "new", "SynthStyleFactory", "(", ")", "{", "@", "Override", "public", "SynthStyle", "getStyle", "(...
Called by UIManager when this look and feel is installed.
[ "Called", "by", "UIManager", "when", "this", "look", "and", "feel", "is", "installed", "." ]
f25ecba622923d7b29b64cb7d6068dd8005989b3
https://github.com/khuxtable/seaglass/blob/f25ecba622923d7b29b64cb7d6068dd8005989b3/src/main/java/com/seaglasslookandfeel/SeaGlassLookAndFeel.java#L308-L325
706
khuxtable/seaglass
src/main/java/com/seaglasslookandfeel/SeaGlassLookAndFeel.java
SeaGlassLookAndFeel.getDefaults
@Override public UIDefaults getDefaults() { if (uiDefaults == null) { uiDefaults = new UIWrapper(super.getDefaults()); // Install Keybindings for the operating system. if (PlatformUtils.isWindows()) { WindowsKeybindings.installKeybindings(uiDefaults); ...
java
@Override public UIDefaults getDefaults() { if (uiDefaults == null) { uiDefaults = new UIWrapper(super.getDefaults()); // Install Keybindings for the operating system. if (PlatformUtils.isWindows()) { WindowsKeybindings.installKeybindings(uiDefaults); ...
[ "@", "Override", "public", "UIDefaults", "getDefaults", "(", ")", "{", "if", "(", "uiDefaults", "==", "null", ")", "{", "uiDefaults", "=", "new", "UIWrapper", "(", "super", ".", "getDefaults", "(", ")", ")", ";", "// Install Keybindings for the operating system....
Returns the defaults for SeaGlassLookAndFeel. @return the UI defaults for SeaGlassLookAndFeel.
[ "Returns", "the", "defaults", "for", "SeaGlassLookAndFeel", "." ]
f25ecba622923d7b29b64cb7d6068dd8005989b3
https://github.com/khuxtable/seaglass/blob/f25ecba622923d7b29b64cb7d6068dd8005989b3/src/main/java/com/seaglasslookandfeel/SeaGlassLookAndFeel.java#L444-L515
707
khuxtable/seaglass
src/main/java/com/seaglasslookandfeel/SeaGlassLookAndFeel.java
SeaGlassLookAndFeel.defineToolTips
private void defineToolTips(UIDefaults d) { String p = "ToolTip"; d.put("seaGlassToolTipBorder", new Color(0x5b7ea4)); d.put(p + ".contentMargins", new InsetsUIResource(4, 4, 4, 4)); d.put(p + ".opaque", Boolean.FALSE); d.put(p + ".background", new ColorUIResource(0xd5, 0xe8, 0xf...
java
private void defineToolTips(UIDefaults d) { String p = "ToolTip"; d.put("seaGlassToolTipBorder", new Color(0x5b7ea4)); d.put(p + ".contentMargins", new InsetsUIResource(4, 4, 4, 4)); d.put(p + ".opaque", Boolean.FALSE); d.put(p + ".background", new ColorUIResource(0xd5, 0xe8, 0xf...
[ "private", "void", "defineToolTips", "(", "UIDefaults", "d", ")", "{", "String", "p", "=", "\"ToolTip\"", ";", "d", ".", "put", "(", "\"seaGlassToolTipBorder\"", ",", "new", "Color", "(", "0x5b7ea4", ")", ")", ";", "d", ".", "put", "(", "p", "+", "\".c...
Define some settings for tool tips. @param d
[ "Define", "some", "settings", "for", "tool", "tips", "." ]
f25ecba622923d7b29b64cb7d6068dd8005989b3
https://github.com/khuxtable/seaglass/blob/f25ecba622923d7b29b64cb7d6068dd8005989b3/src/main/java/com/seaglasslookandfeel/SeaGlassLookAndFeel.java#L573-L580
708
khuxtable/seaglass
src/main/java/com/seaglasslookandfeel/SeaGlassLookAndFeel.java
SeaGlassLookAndFeel.useOurUIs
private void useOurUIs() { for (String uiName : UI_LIST) { uiName = uiName + "UI"; uiDefaults.put(uiName, UI_PACKAGE_PREFIX + uiName); } }
java
private void useOurUIs() { for (String uiName : UI_LIST) { uiName = uiName + "UI"; uiDefaults.put(uiName, UI_PACKAGE_PREFIX + uiName); } }
[ "private", "void", "useOurUIs", "(", ")", "{", "for", "(", "String", "uiName", ":", "UI_LIST", ")", "{", "uiName", "=", "uiName", "+", "\"UI\"", ";", "uiDefaults", ".", "put", "(", "uiName", ",", "UI_PACKAGE_PREFIX", "+", "uiName", ")", ";", "}", "}" ]
Use our UI delegate for the specified UI control type. @param d the UI defaults map. @param uiName the UI type, e.g. "ScrollPane".
[ "Use", "our", "UI", "delegate", "for", "the", "specified", "UI", "control", "type", "." ]
f25ecba622923d7b29b64cb7d6068dd8005989b3
https://github.com/khuxtable/seaglass/blob/f25ecba622923d7b29b64cb7d6068dd8005989b3/src/main/java/com/seaglasslookandfeel/SeaGlassLookAndFeel.java#L588-L593
709
khuxtable/seaglass
src/main/java/com/seaglasslookandfeel/SeaGlassLookAndFeel.java
SeaGlassLookAndFeel.initializeDefaultFont
protected Font initializeDefaultFont() { /* * Set the default font to Lucida Grande if available, else use Lucida * Sans Unicode. Grande is a later font and a bit nicer looking, but it * is a derivation of Sans Unicode, so they're compatible. */ if (defaultFont == nul...
java
protected Font initializeDefaultFont() { /* * Set the default font to Lucida Grande if available, else use Lucida * Sans Unicode. Grande is a later font and a bit nicer looking, but it * is a derivation of Sans Unicode, so they're compatible. */ if (defaultFont == nul...
[ "protected", "Font", "initializeDefaultFont", "(", ")", "{", "/*\n * Set the default font to Lucida Grande if available, else use Lucida\n * Sans Unicode. Grande is a later font and a bit nicer looking, but it\n * is a derivation of Sans Unicode, so they're compatible.\n ...
Initialize the default font. @return the default font.
[ "Initialize", "the", "default", "font", "." ]
f25ecba622923d7b29b64cb7d6068dd8005989b3
https://github.com/khuxtable/seaglass/blob/f25ecba622923d7b29b64cb7d6068dd8005989b3/src/main/java/com/seaglasslookandfeel/SeaGlassLookAndFeel.java#L635-L657
710
khuxtable/seaglass
src/main/java/com/seaglasslookandfeel/SeaGlassLookAndFeel.java
SeaGlassLookAndFeel.defineAquaSettings
private void defineAquaSettings(UIDefaults d) { try { // Instantiate Aqua but don't install it. Class<?> lnfClass = Class.forName(UIManager.getSystemLookAndFeelClassName(), true, Thread.currentThread().getContextClassLoader());...
java
private void defineAquaSettings(UIDefaults d) { try { // Instantiate Aqua but don't install it. Class<?> lnfClass = Class.forName(UIManager.getSystemLookAndFeelClassName(), true, Thread.currentThread().getContextClassLoader());...
[ "private", "void", "defineAquaSettings", "(", "UIDefaults", "d", ")", "{", "try", "{", "// Instantiate Aqua but don't install it.", "Class", "<", "?", ">", "lnfClass", "=", "Class", ".", "forName", "(", "UIManager", ".", "getSystemLookAndFeelClassName", "(", ")", ...
Use Aqua settings for some properties if we're on a Mac. @param d the UI defaults map.
[ "Use", "Aqua", "settings", "for", "some", "properties", "if", "we", "re", "on", "a", "Mac", "." ]
f25ecba622923d7b29b64cb7d6068dd8005989b3
https://github.com/khuxtable/seaglass/blob/f25ecba622923d7b29b64cb7d6068dd8005989b3/src/main/java/com/seaglasslookandfeel/SeaGlassLookAndFeel.java#L891-L908
711
khuxtable/seaglass
src/main/java/com/seaglasslookandfeel/SeaGlassLookAndFeel.java
SeaGlassLookAndFeel.defineArrowButtons
private void defineArrowButtons(UIDefaults d) { String c = PAINTER_PREFIX + "ArrowButtonPainter"; String p = "ArrowButton"; d.put(p + ".States", "Enabled,MouseOver,Disabled,Pressed"); d.put(p + "[Disabled].foreground", new ColorUIResource(0x9ba8cf)); d.put(p + "[Enabled].foregro...
java
private void defineArrowButtons(UIDefaults d) { String c = PAINTER_PREFIX + "ArrowButtonPainter"; String p = "ArrowButton"; d.put(p + ".States", "Enabled,MouseOver,Disabled,Pressed"); d.put(p + "[Disabled].foreground", new ColorUIResource(0x9ba8cf)); d.put(p + "[Enabled].foregro...
[ "private", "void", "defineArrowButtons", "(", "UIDefaults", "d", ")", "{", "String", "c", "=", "PAINTER_PREFIX", "+", "\"ArrowButtonPainter\"", ";", "String", "p", "=", "\"ArrowButton\"", ";", "d", ".", "put", "(", "p", "+", "\".States\"", ",", "\"Enabled,Mous...
Initialize the arrow button settings. @param d the UI defaults map.
[ "Initialize", "the", "arrow", "button", "settings", "." ]
f25ecba622923d7b29b64cb7d6068dd8005989b3
https://github.com/khuxtable/seaglass/blob/f25ecba622923d7b29b64cb7d6068dd8005989b3/src/main/java/com/seaglasslookandfeel/SeaGlassLookAndFeel.java#L915-L928
712
khuxtable/seaglass
src/main/java/com/seaglasslookandfeel/SeaGlassLookAndFeel.java
SeaGlassLookAndFeel.defineDesktopPanes
private void defineDesktopPanes(UIDefaults d) { d.put("seaGlassDesktopPane", new ColorUIResource(0x556ba6)); String c = PAINTER_PREFIX + "DesktopPanePainter"; String p = "DesktopPane"; d.put(p + "[Enabled].backgroundPainter", new LazyPainter(c, DesktopPanePainter.Which.BACKGROUND_ENABL...
java
private void defineDesktopPanes(UIDefaults d) { d.put("seaGlassDesktopPane", new ColorUIResource(0x556ba6)); String c = PAINTER_PREFIX + "DesktopPanePainter"; String p = "DesktopPane"; d.put(p + "[Enabled].backgroundPainter", new LazyPainter(c, DesktopPanePainter.Which.BACKGROUND_ENABL...
[ "private", "void", "defineDesktopPanes", "(", "UIDefaults", "d", ")", "{", "d", ".", "put", "(", "\"seaGlassDesktopPane\"", ",", "new", "ColorUIResource", "(", "0x556ba6", ")", ")", ";", "String", "c", "=", "PAINTER_PREFIX", "+", "\"DesktopPanePainter\"", ";", ...
Initialize the desktop pane UI settings. @param d the UI defaults map.
[ "Initialize", "the", "desktop", "pane", "UI", "settings", "." ]
f25ecba622923d7b29b64cb7d6068dd8005989b3
https://github.com/khuxtable/seaglass/blob/f25ecba622923d7b29b64cb7d6068dd8005989b3/src/main/java/com/seaglasslookandfeel/SeaGlassLookAndFeel.java#L1143-L1156
713
khuxtable/seaglass
src/main/java/com/seaglasslookandfeel/SeaGlassLookAndFeel.java
SeaGlassLookAndFeel.defineInternalFrameCloseButtons
private void defineInternalFrameCloseButtons(UIDefaults d) { String p = "InternalFrame:InternalFrameTitlePane:\"InternalFrameTitlePane.closeButton\""; String c = PAINTER_PREFIX + "TitlePaneCloseButtonPainter"; // Set the multiplicity of states for the Close button. d.put(p + ".States", ...
java
private void defineInternalFrameCloseButtons(UIDefaults d) { String p = "InternalFrame:InternalFrameTitlePane:\"InternalFrameTitlePane.closeButton\""; String c = PAINTER_PREFIX + "TitlePaneCloseButtonPainter"; // Set the multiplicity of states for the Close button. d.put(p + ".States", ...
[ "private", "void", "defineInternalFrameCloseButtons", "(", "UIDefaults", "d", ")", "{", "String", "p", "=", "\"InternalFrame:InternalFrameTitlePane:\\\"InternalFrameTitlePane.closeButton\\\"\"", ";", "String", "c", "=", "PAINTER_PREFIX", "+", "\"TitlePaneCloseButtonPainter\"", ...
Initialize the internal frame close button settings. @param d the UI defaults map.
[ "Initialize", "the", "internal", "frame", "close", "button", "settings", "." ]
f25ecba622923d7b29b64cb7d6068dd8005989b3
https://github.com/khuxtable/seaglass/blob/f25ecba622923d7b29b64cb7d6068dd8005989b3/src/main/java/com/seaglasslookandfeel/SeaGlassLookAndFeel.java#L1234-L1252
714
khuxtable/seaglass
src/main/java/com/seaglasslookandfeel/SeaGlassLookAndFeel.java
SeaGlassLookAndFeel.defineInternalFrameIconifyButtons
private void defineInternalFrameIconifyButtons(UIDefaults d) { String p = "InternalFrame:InternalFrameTitlePane:\"InternalFrameTitlePane.iconifyButton\""; String c = PAINTER_PREFIX + "TitlePaneIconifyButtonPainter"; d.put(p + ".States", "Enabled,MouseOver,Pressed,Disabled,Focused,Selected,Windo...
java
private void defineInternalFrameIconifyButtons(UIDefaults d) { String p = "InternalFrame:InternalFrameTitlePane:\"InternalFrameTitlePane.iconifyButton\""; String c = PAINTER_PREFIX + "TitlePaneIconifyButtonPainter"; d.put(p + ".States", "Enabled,MouseOver,Pressed,Disabled,Focused,Selected,Windo...
[ "private", "void", "defineInternalFrameIconifyButtons", "(", "UIDefaults", "d", ")", "{", "String", "p", "=", "\"InternalFrame:InternalFrameTitlePane:\\\"InternalFrameTitlePane.iconifyButton\\\"\"", ";", "String", "c", "=", "PAINTER_PREFIX", "+", "\"TitlePaneIconifyButtonPainter\...
Initialize the internal frame iconify button settings. @param d the UI defaults map.
[ "Initialize", "the", "internal", "frame", "iconify", "button", "settings", "." ]
f25ecba622923d7b29b64cb7d6068dd8005989b3
https://github.com/khuxtable/seaglass/blob/f25ecba622923d7b29b64cb7d6068dd8005989b3/src/main/java/com/seaglasslookandfeel/SeaGlassLookAndFeel.java#L1259-L1301
715
khuxtable/seaglass
src/main/java/com/seaglasslookandfeel/SeaGlassLookAndFeel.java
SeaGlassLookAndFeel.defineInternalFrameMaximizeButton
private void defineInternalFrameMaximizeButton(UIDefaults d) { String p = "InternalFrame:InternalFrameTitlePane:\"InternalFrameTitlePane.maximizeButton\""; String c = PAINTER_PREFIX + "TitlePaneMaximizeButtonPainter"; d.put(p + ".WindowNotFocused", new TitlePaneMaximizeButtonWindowNotFocusedSta...
java
private void defineInternalFrameMaximizeButton(UIDefaults d) { String p = "InternalFrame:InternalFrameTitlePane:\"InternalFrameTitlePane.maximizeButton\""; String c = PAINTER_PREFIX + "TitlePaneMaximizeButtonPainter"; d.put(p + ".WindowNotFocused", new TitlePaneMaximizeButtonWindowNotFocusedSta...
[ "private", "void", "defineInternalFrameMaximizeButton", "(", "UIDefaults", "d", ")", "{", "String", "p", "=", "\"InternalFrame:InternalFrameTitlePane:\\\"InternalFrameTitlePane.maximizeButton\\\"\"", ";", "String", "c", "=", "PAINTER_PREFIX", "+", "\"TitlePaneMaximizeButtonPainte...
Initialize the internal frame maximize button settings. @param d the UI defaults map.
[ "Initialize", "the", "internal", "frame", "maximize", "button", "settings", "." ]
f25ecba622923d7b29b64cb7d6068dd8005989b3
https://github.com/khuxtable/seaglass/blob/f25ecba622923d7b29b64cb7d6068dd8005989b3/src/main/java/com/seaglasslookandfeel/SeaGlassLookAndFeel.java#L1308-L1355
716
khuxtable/seaglass
src/main/java/com/seaglasslookandfeel/SeaGlassLookAndFeel.java
SeaGlassLookAndFeel.defineInternalFrameMenuButtons
private void defineInternalFrameMenuButtons(UIDefaults d) { String p = "InternalFrame:InternalFrameTitlePane:\"InternalFrameTitlePane.menuButton\""; String c = PAINTER_PREFIX + "TitlePaneMenuButtonPainter"; d.put(p + ".WindowNotFocused", new TitlePaneMenuButtonWindowNotFocusedState()); ...
java
private void defineInternalFrameMenuButtons(UIDefaults d) { String p = "InternalFrame:InternalFrameTitlePane:\"InternalFrameTitlePane.menuButton\""; String c = PAINTER_PREFIX + "TitlePaneMenuButtonPainter"; d.put(p + ".WindowNotFocused", new TitlePaneMenuButtonWindowNotFocusedState()); ...
[ "private", "void", "defineInternalFrameMenuButtons", "(", "UIDefaults", "d", ")", "{", "String", "p", "=", "\"InternalFrame:InternalFrameTitlePane:\\\"InternalFrameTitlePane.menuButton\\\"\"", ";", "String", "c", "=", "PAINTER_PREFIX", "+", "\"TitlePaneMenuButtonPainter\"", ";"...
Initialize the internal frame menu button settings. @param d the UI defaults map.
[ "Initialize", "the", "internal", "frame", "menu", "button", "settings", "." ]
f25ecba622923d7b29b64cb7d6068dd8005989b3
https://github.com/khuxtable/seaglass/blob/f25ecba622923d7b29b64cb7d6068dd8005989b3/src/main/java/com/seaglasslookandfeel/SeaGlassLookAndFeel.java#L1362-L1385
717
khuxtable/seaglass
src/main/java/com/seaglasslookandfeel/SeaGlassLookAndFeel.java
SeaGlassLookAndFeel.defineLists
private void defineLists(UIDefaults d) { String p = "List"; d.put(p + ".contentMargins", new InsetsUIResource(0, 0, 0, 0)); d.put(p + ".opaque", Boolean.TRUE); d.put(p + ".background", d.get("seaGlassLightBackground")); d.put(p + ".dropLineColor", d.get("seaGlassFocus")); ...
java
private void defineLists(UIDefaults d) { String p = "List"; d.put(p + ".contentMargins", new InsetsUIResource(0, 0, 0, 0)); d.put(p + ".opaque", Boolean.TRUE); d.put(p + ".background", d.get("seaGlassLightBackground")); d.put(p + ".dropLineColor", d.get("seaGlassFocus")); ...
[ "private", "void", "defineLists", "(", "UIDefaults", "d", ")", "{", "String", "p", "=", "\"List\"", ";", "d", ".", "put", "(", "p", "+", "\".contentMargins\"", ",", "new", "InsetsUIResource", "(", "0", ",", "0", ",", "0", ",", "0", ")", ")", ";", "...
Initialize the list settings. @param d the UI defaults map.
[ "Initialize", "the", "list", "settings", "." ]
f25ecba622923d7b29b64cb7d6068dd8005989b3
https://github.com/khuxtable/seaglass/blob/f25ecba622923d7b29b64cb7d6068dd8005989b3/src/main/java/com/seaglasslookandfeel/SeaGlassLookAndFeel.java#L1392-L1418
718
khuxtable/seaglass
src/main/java/com/seaglasslookandfeel/SeaGlassLookAndFeel.java
SeaGlassLookAndFeel.definePanels
private void definePanels(UIDefaults d) { String p = "Panel"; d.put(p + ".contentMargins", new InsetsUIResource(0, 0, 0, 0)); d.put(p + ".background", new ColorUIResource((Color) d.get("control"))); d.put(p + ".opaque", Boolean.TRUE); }
java
private void definePanels(UIDefaults d) { String p = "Panel"; d.put(p + ".contentMargins", new InsetsUIResource(0, 0, 0, 0)); d.put(p + ".background", new ColorUIResource((Color) d.get("control"))); d.put(p + ".opaque", Boolean.TRUE); }
[ "private", "void", "definePanels", "(", "UIDefaults", "d", ")", "{", "String", "p", "=", "\"Panel\"", ";", "d", ".", "put", "(", "p", "+", "\".contentMargins\"", ",", "new", "InsetsUIResource", "(", "0", ",", "0", ",", "0", ",", "0", ")", ")", ";", ...
Initialize the panel settings. @param d the UI defaults map.
[ "Initialize", "the", "panel", "settings", "." ]
f25ecba622923d7b29b64cb7d6068dd8005989b3
https://github.com/khuxtable/seaglass/blob/f25ecba622923d7b29b64cb7d6068dd8005989b3/src/main/java/com/seaglasslookandfeel/SeaGlassLookAndFeel.java#L1560-L1565
719
khuxtable/seaglass
src/main/java/com/seaglasslookandfeel/SeaGlassLookAndFeel.java
SeaGlassLookAndFeel.definePopups
private void definePopups(UIDefaults d) { d.put("seaGlassPopupBorder", new ColorUIResource(0xbbbbbb)); d.put("popupMenuInteriorEnabled", Color.WHITE); // Rossi: Changed color of popup / submenus to get better contrast to bright backgrounds. // d.put("popupMenuBorderEnabled", new Color(0x...
java
private void definePopups(UIDefaults d) { d.put("seaGlassPopupBorder", new ColorUIResource(0xbbbbbb)); d.put("popupMenuInteriorEnabled", Color.WHITE); // Rossi: Changed color of popup / submenus to get better contrast to bright backgrounds. // d.put("popupMenuBorderEnabled", new Color(0x...
[ "private", "void", "definePopups", "(", "UIDefaults", "d", ")", "{", "d", ".", "put", "(", "\"seaGlassPopupBorder\"", ",", "new", "ColorUIResource", "(", "0xbbbbbb", ")", ")", ";", "d", ".", "put", "(", "\"popupMenuInteriorEnabled\"", ",", "Color", ".", "WHI...
Initialize the popup settings. @param d the UI defaults map.
[ "Initialize", "the", "popup", "settings", "." ]
f25ecba622923d7b29b64cb7d6068dd8005989b3
https://github.com/khuxtable/seaglass/blob/f25ecba622923d7b29b64cb7d6068dd8005989b3/src/main/java/com/seaglasslookandfeel/SeaGlassLookAndFeel.java#L1572-L1594
720
khuxtable/seaglass
src/main/java/com/seaglasslookandfeel/SeaGlassLookAndFeel.java
SeaGlassLookAndFeel.defineProgressBars
private void defineProgressBars(UIDefaults d) { // Copied from nimbus //Initialize ProgressBar d.put("ProgressBar.contentMargins", new InsetsUIResource(0, 0, 0, 0)); d.put("ProgressBar.States", "Enabled,Disabled,Indeterminate,Finished"); d.put("ProgressBar.tileWhenIndeterminate", ...
java
private void defineProgressBars(UIDefaults d) { // Copied from nimbus //Initialize ProgressBar d.put("ProgressBar.contentMargins", new InsetsUIResource(0, 0, 0, 0)); d.put("ProgressBar.States", "Enabled,Disabled,Indeterminate,Finished"); d.put("ProgressBar.tileWhenIndeterminate", ...
[ "private", "void", "defineProgressBars", "(", "UIDefaults", "d", ")", "{", "// Copied from nimbus", "//Initialize ProgressBar", "d", ".", "put", "(", "\"ProgressBar.contentMargins\"", ",", "new", "InsetsUIResource", "(", "0", ",", "0", ",", "0", ",", "0", ")", "...
Initialize the progress bar settings. @param d the UI defaults map.
[ "Initialize", "the", "progress", "bar", "settings", "." ]
f25ecba622923d7b29b64cb7d6068dd8005989b3
https://github.com/khuxtable/seaglass/blob/f25ecba622923d7b29b64cb7d6068dd8005989b3/src/main/java/com/seaglasslookandfeel/SeaGlassLookAndFeel.java#L1601-L1644
721
khuxtable/seaglass
src/main/java/com/seaglasslookandfeel/SeaGlassLookAndFeel.java
SeaGlassLookAndFeel.defineRootPanes
private void defineRootPanes(UIDefaults d) { String c = PAINTER_PREFIX + "FrameAndRootPainter"; String p = "RootPane"; d.put(p + ".States", "Enabled,WindowFocused,NoFrame"); d.put(p + ".contentMargins", new InsetsUIResource(0, 0, 0, 0)); d.put(p + ".opaque", Boolean.FALSE); ...
java
private void defineRootPanes(UIDefaults d) { String c = PAINTER_PREFIX + "FrameAndRootPainter"; String p = "RootPane"; d.put(p + ".States", "Enabled,WindowFocused,NoFrame"); d.put(p + ".contentMargins", new InsetsUIResource(0, 0, 0, 0)); d.put(p + ".opaque", Boolean.FALSE); ...
[ "private", "void", "defineRootPanes", "(", "UIDefaults", "d", ")", "{", "String", "c", "=", "PAINTER_PREFIX", "+", "\"FrameAndRootPainter\"", ";", "String", "p", "=", "\"RootPane\"", ";", "d", ".", "put", "(", "p", "+", "\".States\"", ",", "\"Enabled,WindowFoc...
Initialize the root pane settings. @param d the UI defaults map.
[ "Initialize", "the", "root", "pane", "settings", "." ]
f25ecba622923d7b29b64cb7d6068dd8005989b3
https://github.com/khuxtable/seaglass/blob/f25ecba622923d7b29b64cb7d6068dd8005989b3/src/main/java/com/seaglasslookandfeel/SeaGlassLookAndFeel.java#L1651-L1664
722
khuxtable/seaglass
src/main/java/com/seaglasslookandfeel/SeaGlassLookAndFeel.java
SeaGlassLookAndFeel.defineScrollPane
private void defineScrollPane(UIDefaults d) { // Define ScrollPane border painters. String c = PAINTER_PREFIX + "ScrollPanePainter"; String p = "ScrollPane"; d.put(p + ".opaque", Boolean.FALSE); d.put(p + ".contentMargins", new InsetsUIResource(3, 3, 3, 3)); // d.put(p + ...
java
private void defineScrollPane(UIDefaults d) { // Define ScrollPane border painters. String c = PAINTER_PREFIX + "ScrollPanePainter"; String p = "ScrollPane"; d.put(p + ".opaque", Boolean.FALSE); d.put(p + ".contentMargins", new InsetsUIResource(3, 3, 3, 3)); // d.put(p + ...
[ "private", "void", "defineScrollPane", "(", "UIDefaults", "d", ")", "{", "// Define ScrollPane border painters.", "String", "c", "=", "PAINTER_PREFIX", "+", "\"ScrollPanePainter\"", ";", "String", "p", "=", "\"ScrollPane\"", ";", "d", ".", "put", "(", "p", "+", ...
Initialize the scroll pane UI @param d
[ "Initialize", "the", "scroll", "pane", "UI" ]
f25ecba622923d7b29b64cb7d6068dd8005989b3
https://github.com/khuxtable/seaglass/blob/f25ecba622923d7b29b64cb7d6068dd8005989b3/src/main/java/com/seaglasslookandfeel/SeaGlassLookAndFeel.java#L1670-L1688
723
khuxtable/seaglass
src/main/java/com/seaglasslookandfeel/SeaGlassLookAndFeel.java
SeaGlassLookAndFeel.defineSeparators
private void defineSeparators(UIDefaults d) { String c = PAINTER_PREFIX + "SeparatorPainter"; d.put("Separator.contentMargins", new InsetsUIResource(0, 0, 0, 0)); d.put("Separator[Enabled].backgroundPainter", new LazyPainter(c, SeparatorPainter.Which.BACKGROUND_ENABLED)); }
java
private void defineSeparators(UIDefaults d) { String c = PAINTER_PREFIX + "SeparatorPainter"; d.put("Separator.contentMargins", new InsetsUIResource(0, 0, 0, 0)); d.put("Separator[Enabled].backgroundPainter", new LazyPainter(c, SeparatorPainter.Which.BACKGROUND_ENABLED)); }
[ "private", "void", "defineSeparators", "(", "UIDefaults", "d", ")", "{", "String", "c", "=", "PAINTER_PREFIX", "+", "\"SeparatorPainter\"", ";", "d", ".", "put", "(", "\"Separator.contentMargins\"", ",", "new", "InsetsUIResource", "(", "0", ",", "0", ",", "0",...
Initialize the separator settings. @param d the UI defaults map.
[ "Initialize", "the", "separator", "settings", "." ]
f25ecba622923d7b29b64cb7d6068dd8005989b3
https://github.com/khuxtable/seaglass/blob/f25ecba622923d7b29b64cb7d6068dd8005989b3/src/main/java/com/seaglasslookandfeel/SeaGlassLookAndFeel.java#L1771-L1775
724
khuxtable/seaglass
src/main/java/com/seaglasslookandfeel/SeaGlassLookAndFeel.java
SeaGlassLookAndFeel.defineSplitPanes
private void defineSplitPanes(UIDefaults d) { d.put("splitPaneDividerBackgroundOuter", new Color(0xd9d9d9)); String p = "SplitPane"; d.put(p + ".contentMargins", new InsetsUIResource(1, 1, 1, 1)); d.put(p + ".States", "Enabled,MouseOver,Pressed,Disabled,Focused,Selected,Vertical"); ...
java
private void defineSplitPanes(UIDefaults d) { d.put("splitPaneDividerBackgroundOuter", new Color(0xd9d9d9)); String p = "SplitPane"; d.put(p + ".contentMargins", new InsetsUIResource(1, 1, 1, 1)); d.put(p + ".States", "Enabled,MouseOver,Pressed,Disabled,Focused,Selected,Vertical"); ...
[ "private", "void", "defineSplitPanes", "(", "UIDefaults", "d", ")", "{", "d", ".", "put", "(", "\"splitPaneDividerBackgroundOuter\"", ",", "new", "Color", "(", "0xd9d9d9", ")", ")", ";", "String", "p", "=", "\"SplitPane\"", ";", "d", ".", "put", "(", "p", ...
Initialize the split pane UI settings. @param d the UI defaults map.
[ "Initialize", "the", "split", "pane", "UI", "settings", "." ]
f25ecba622923d7b29b64cb7d6068dd8005989b3
https://github.com/khuxtable/seaglass/blob/f25ecba622923d7b29b64cb7d6068dd8005989b3/src/main/java/com/seaglasslookandfeel/SeaGlassLookAndFeel.java#L1906-L1934
725
khuxtable/seaglass
src/main/java/com/seaglasslookandfeel/SeaGlassLookAndFeel.java
SeaGlassLookAndFeel.getPaintingInsets
public static Insets getPaintingInsets(SynthContext state, Insets insets) { if (state.getRegion().isSubregion()) { insets = state.getStyle().getInsets(state, insets); } else { insets = state.getComponent().getInsets(insets); } return insets; }
java
public static Insets getPaintingInsets(SynthContext state, Insets insets) { if (state.getRegion().isSubregion()) { insets = state.getStyle().getInsets(state, insets); } else { insets = state.getComponent().getInsets(insets); } return insets; }
[ "public", "static", "Insets", "getPaintingInsets", "(", "SynthContext", "state", ",", "Insets", "insets", ")", "{", "if", "(", "state", ".", "getRegion", "(", ")", ".", "isSubregion", "(", ")", ")", "{", "insets", "=", "state", ".", "getStyle", "(", ")",...
A convenience method to return where the foreground should be painted for the Component identified by the passed in AbstractSynthContext. @param state the SynthContext representing the current state. @param insets an Insets object to be filled with the painting insets. @return the insets object passed in and fille...
[ "A", "convenience", "method", "to", "return", "where", "the", "foreground", "should", "be", "painted", "for", "the", "Component", "identified", "by", "the", "passed", "in", "AbstractSynthContext", "." ]
f25ecba622923d7b29b64cb7d6068dd8005989b3
https://github.com/khuxtable/seaglass/blob/f25ecba622923d7b29b64cb7d6068dd8005989b3/src/main/java/com/seaglasslookandfeel/SeaGlassLookAndFeel.java#L2522-L2530
726
khuxtable/seaglass
src/main/java/com/seaglasslookandfeel/SeaGlassLookAndFeel.java
SeaGlassLookAndFeel.resolveToolbarConstraint
public static Object resolveToolbarConstraint(JToolBar toolbar) { /* * NOTE: we don't worry about component orientation or PAGE_END etc * because the BasicToolBarUI always uses an absolute position of * NORTH/SOUTH/EAST/WEST. */ if (toolbar != null) { Cont...
java
public static Object resolveToolbarConstraint(JToolBar toolbar) { /* * NOTE: we don't worry about component orientation or PAGE_END etc * because the BasicToolBarUI always uses an absolute position of * NORTH/SOUTH/EAST/WEST. */ if (toolbar != null) { Cont...
[ "public", "static", "Object", "resolveToolbarConstraint", "(", "JToolBar", "toolbar", ")", "{", "/*\n * NOTE: we don't worry about component orientation or PAGE_END etc\n * because the BasicToolBarUI always uses an absolute position of\n * NORTH/SOUTH/EAST/WEST.\n *...
Package private method which returns either BorderLayout.NORTH, BorderLayout.SOUTH, BorderLayout.EAST, or BorderLayout.WEST depending on the location of the toolbar in its parent. The toolbar might be in PAGE_START, PAGE_END, CENTER, or some other position, but will be resolved to either NORTH,SOUTH,EAST, or WEST based...
[ "Package", "private", "method", "which", "returns", "either", "BorderLayout", ".", "NORTH", "BorderLayout", ".", "SOUTH", "BorderLayout", ".", "EAST", "or", "BorderLayout", ".", "WEST", "depending", "on", "the", "location", "of", "the", "toolbar", "in", "its", ...
f25ecba622923d7b29b64cb7d6068dd8005989b3
https://github.com/khuxtable/seaglass/blob/f25ecba622923d7b29b64cb7d6068dd8005989b3/src/main/java/com/seaglasslookandfeel/SeaGlassLookAndFeel.java#L2585-L2611
727
khuxtable/seaglass
src/main/java/com/seaglasslookandfeel/SeaGlassLookAndFeel.java
SeaGlassLookAndFeel.register
public void register(Region region, String prefix) { // validate the method arguments if (region == null || prefix == null) { throw new IllegalArgumentException("Neither Region nor Prefix may be null"); } // Add a LazyStyle for this region/prefix to styleMap. List<La...
java
public void register(Region region, String prefix) { // validate the method arguments if (region == null || prefix == null) { throw new IllegalArgumentException("Neither Region nor Prefix may be null"); } // Add a LazyStyle for this region/prefix to styleMap. List<La...
[ "public", "void", "register", "(", "Region", "region", ",", "String", "prefix", ")", "{", "// validate the method arguments", "if", "(", "region", "==", "null", "||", "prefix", "==", "null", ")", "{", "throw", "new", "IllegalArgumentException", "(", "\"Neither R...
Registers the given region and prefix. The prefix, if it contains quoted sections, refers to certain named components. If there are not quoted sections, then the prefix refers to a generic component type. <p>If the given region/prefix combo has already been registered, then it will not be registered twice. The second ...
[ "Registers", "the", "given", "region", "and", "prefix", ".", "The", "prefix", "if", "it", "contains", "quoted", "sections", "refers", "to", "certain", "named", "components", ".", "If", "there", "are", "not", "quoted", "sections", "then", "the", "prefix", "re...
f25ecba622923d7b29b64cb7d6068dd8005989b3
https://github.com/khuxtable/seaglass/blob/f25ecba622923d7b29b64cb7d6068dd8005989b3/src/main/java/com/seaglasslookandfeel/SeaGlassLookAndFeel.java#L2628-L2657
728
khuxtable/seaglass
src/main/java/com/seaglasslookandfeel/SeaGlassLookAndFeel.java
SeaGlassLookAndFeel.getSeaGlassStyle
SynthStyle getSeaGlassStyle(JComponent c, Region r) { // validate method arguments if (c == null || r == null) { throw new IllegalArgumentException("Neither comp nor r may be null"); } // if there are no lazy styles registered for the region r, then return // the def...
java
SynthStyle getSeaGlassStyle(JComponent c, Region r) { // validate method arguments if (c == null || r == null) { throw new IllegalArgumentException("Neither comp nor r may be null"); } // if there are no lazy styles registered for the region r, then return // the def...
[ "SynthStyle", "getSeaGlassStyle", "(", "JComponent", "c", ",", "Region", "r", ")", "{", "// validate method arguments", "if", "(", "c", "==", "null", "||", "r", "==", "null", ")", "{", "throw", "new", "IllegalArgumentException", "(", "\"Neither comp nor r may be n...
Locate the style associated with the given region and component. This is called from SeaGlassLookAndFeel in the SynthStyleFactory implementation. <p>Lookup occurs as follows:<br/> Check the map of styles <code>styleMap</code>. If the map contains no styles at all, then simply return the defaultStyle. If the map contai...
[ "Locate", "the", "style", "associated", "with", "the", "given", "region", "and", "component", ".", "This", "is", "called", "from", "SeaGlassLookAndFeel", "in", "the", "SynthStyleFactory", "implementation", "." ]
f25ecba622923d7b29b64cb7d6068dd8005989b3
https://github.com/khuxtable/seaglass/blob/f25ecba622923d7b29b64cb7d6068dd8005989b3/src/main/java/com/seaglasslookandfeel/SeaGlassLookAndFeel.java#L2680-L2718
729
khuxtable/seaglass
src/main/java/com/seaglasslookandfeel/SeaGlassLookAndFeel.java
SeaGlassLookAndFeel.getComponentState
public static int getComponentState(Component c) { if (c.isEnabled()) { if (c.isFocusOwner()) { return SeaglassUI.ENABLED | SeaglassUI.FOCUSED; } return SeaglassUI.ENABLED; } return SeaglassUI.DISABLED; }
java
public static int getComponentState(Component c) { if (c.isEnabled()) { if (c.isFocusOwner()) { return SeaglassUI.ENABLED | SeaglassUI.FOCUSED; } return SeaglassUI.ENABLED; } return SeaglassUI.DISABLED; }
[ "public", "static", "int", "getComponentState", "(", "Component", "c", ")", "{", "if", "(", "c", ".", "isEnabled", "(", ")", ")", "{", "if", "(", "c", ".", "isFocusOwner", "(", ")", ")", "{", "return", "SeaglassUI", ".", "ENABLED", "|", "SeaglassUI", ...
Returns the component state for the specified component. This should only be used for Components that don't have any special state beyond that of ENABLED, DISABLED or FOCUSED. For example, buttons shouldn't call into this method. @param c the component. @return the simple state of the component.
[ "Returns", "the", "component", "state", "for", "the", "specified", "component", ".", "This", "should", "only", "be", "used", "for", "Components", "that", "don", "t", "have", "any", "special", "state", "beyond", "that", "of", "ENABLED", "DISABLED", "or", "FOC...
f25ecba622923d7b29b64cb7d6068dd8005989b3
https://github.com/khuxtable/seaglass/blob/f25ecba622923d7b29b64cb7d6068dd8005989b3/src/main/java/com/seaglasslookandfeel/SeaGlassLookAndFeel.java#L2758-L2769
730
khuxtable/seaglass
src/main/java/com/seaglasslookandfeel/SeaGlassLookAndFeel.java
SeaGlassLookAndFeel.updateSubregion
public static void updateSubregion(SynthContext state, Graphics g, Rectangle bounds) { paintRegion(state, g, bounds); }
java
public static void updateSubregion(SynthContext state, Graphics g, Rectangle bounds) { paintRegion(state, g, bounds); }
[ "public", "static", "void", "updateSubregion", "(", "SynthContext", "state", ",", "Graphics", "g", ",", "Rectangle", "bounds", ")", "{", "paintRegion", "(", "state", ",", "g", ",", "bounds", ")", ";", "}" ]
A convenience method that handles painting of the background for subregions. All SynthUI's that have subregions should invoke this method, than paint the foreground. @param state the SynthContext describing the component, region, and state. @param g the Graphics context used to paint the subregion. @param bounds...
[ "A", "convenience", "method", "that", "handles", "painting", "of", "the", "background", "for", "subregions", ".", "All", "SynthUI", "s", "that", "have", "subregions", "should", "invoke", "this", "method", "than", "paint", "the", "foreground", "." ]
f25ecba622923d7b29b64cb7d6068dd8005989b3
https://github.com/khuxtable/seaglass/blob/f25ecba622923d7b29b64cb7d6068dd8005989b3/src/main/java/com/seaglasslookandfeel/SeaGlassLookAndFeel.java#L2792-L2794
731
khuxtable/seaglass
src/main/java/com/seaglasslookandfeel/SeaGlassLookAndFeel.java
SeaGlassLookAndFeel.paintRegion
private static void paintRegion(SynthContext state, Graphics g, Rectangle bounds) { JComponent c = state.getComponent(); SynthStyle style = state.getStyle(); int x; int y; int width; int height; if (bounds == null) { ...
java
private static void paintRegion(SynthContext state, Graphics g, Rectangle bounds) { JComponent c = state.getComponent(); SynthStyle style = state.getStyle(); int x; int y; int width; int height; if (bounds == null) { ...
[ "private", "static", "void", "paintRegion", "(", "SynthContext", "state", ",", "Graphics", "g", ",", "Rectangle", "bounds", ")", "{", "JComponent", "c", "=", "state", ".", "getComponent", "(", ")", ";", "SynthStyle", "style", "=", "state", ".", "getStyle", ...
Paint a region. @param state the SynthContext describing the current component, region, and state. @param g the Graphics context used to paint the subregion. @param bounds the bounds to paint in.
[ "Paint", "a", "region", "." ]
f25ecba622923d7b29b64cb7d6068dd8005989b3
https://github.com/khuxtable/seaglass/blob/f25ecba622923d7b29b64cb7d6068dd8005989b3/src/main/java/com/seaglasslookandfeel/SeaGlassLookAndFeel.java#L2804-L2831
732
khuxtable/seaglass
src/main/java/com/seaglasslookandfeel/SeaGlassLookAndFeel.java
SeaGlassLookAndFeel.getDerivedColor
public DerivedColor getDerivedColor(String parentUin, float hOffset, float sOffset, float bOffset, int aOffset, boolean uiResource){ return getDerivedColor(null, parentUin, ...
java
public DerivedColor getDerivedColor(String parentUin, float hOffset, float sOffset, float bOffset, int aOffset, boolean uiResource){ return getDerivedColor(null, parentUin, ...
[ "public", "DerivedColor", "getDerivedColor", "(", "String", "parentUin", ",", "float", "hOffset", ",", "float", "sOffset", ",", "float", "bOffset", ",", "int", "aOffset", ",", "boolean", "uiResource", ")", "{", "return", "getDerivedColor", "(", "null", ",", "p...
Get a derived color, derived colors are shared instances and will be updated when its parent UIDefault color changes. @param uiDefaultParentName The parent UIDefault key @param hOffset The hue offset @param sOffset The saturation offset @param bOffset The brightness offset @param aOffset The alpha offset @param uiReso...
[ "Get", "a", "derived", "color", "derived", "colors", "are", "shared", "instances", "and", "will", "be", "updated", "when", "its", "parent", "UIDefault", "color", "changes", "." ]
f25ecba622923d7b29b64cb7d6068dd8005989b3
https://github.com/khuxtable/seaglass/blob/f25ecba622923d7b29b64cb7d6068dd8005989b3/src/main/java/com/seaglasslookandfeel/SeaGlassLookAndFeel.java#L3416-L3422
733
khuxtable/seaglass
src/main/java/com/seaglasslookandfeel/SeaGlassLookAndFeel.java
SeaGlassLookAndFeel.getDerivedColor
protected final Color getDerivedColor(Color color1, Color color2, float midPoint, boolean uiResource) { int argb = deriveARGB(color1, color2, midPoint); if (uiResource) { return new ColorUIResource(argb); } else { ...
java
protected final Color getDerivedColor(Color color1, Color color2, float midPoint, boolean uiResource) { int argb = deriveARGB(color1, color2, midPoint); if (uiResource) { return new ColorUIResource(argb); } else { ...
[ "protected", "final", "Color", "getDerivedColor", "(", "Color", "color1", ",", "Color", "color2", ",", "float", "midPoint", ",", "boolean", "uiResource", ")", "{", "int", "argb", "=", "deriveARGB", "(", "color1", ",", "color2", ",", "midPoint", ")", ";", "...
Decodes and returns a color, which is derived from an offset between two other colors. @param color1 The first color @param color2 The second color @param midPoint The offset between color 1 and color 2, a value of 0.0 is color 1 and 1.0 is color 2; @param uiResource True if the derived color should be a UIResourc...
[ "Decodes", "and", "returns", "a", "color", "which", "is", "derived", "from", "an", "offset", "between", "two", "other", "colors", "." ]
f25ecba622923d7b29b64cb7d6068dd8005989b3
https://github.com/khuxtable/seaglass/blob/f25ecba622923d7b29b64cb7d6068dd8005989b3/src/main/java/com/seaglasslookandfeel/SeaGlassLookAndFeel.java#L3450-L3458
734
khuxtable/seaglass
src/main/java/com/seaglasslookandfeel/ui/SeaGlassSliderUI.java
SeaGlassSliderUI.getPadForLabel
private int getPadForLabel(int i) { Dictionary dictionary = slider.getLabelTable(); int pad = 0; Object o = dictionary.get(i); if (o != null) { Component c = (Component) o; int centerX = xPositionForValue(i); int cHalfWidth = c.getPreferredSize().widt...
java
private int getPadForLabel(int i) { Dictionary dictionary = slider.getLabelTable(); int pad = 0; Object o = dictionary.get(i); if (o != null) { Component c = (Component) o; int centerX = xPositionForValue(i); int cHalfWidth = c.getPreferredSize().widt...
[ "private", "int", "getPadForLabel", "(", "int", "i", ")", "{", "Dictionary", "dictionary", "=", "slider", ".", "getLabelTable", "(", ")", ";", "int", "pad", "=", "0", ";", "Object", "o", "=", "dictionary", ".", "get", "(", "i", ")", ";", "if", "(", ...
Calculates the pad for the label at the specified index. @param index index of the label to calculate pad for. @return padding required to keep label visible.
[ "Calculates", "the", "pad", "for", "the", "label", "at", "the", "specified", "index", "." ]
f25ecba622923d7b29b64cb7d6068dd8005989b3
https://github.com/khuxtable/seaglass/blob/f25ecba622923d7b29b64cb7d6068dd8005989b3/src/main/java/com/seaglasslookandfeel/ui/SeaGlassSliderUI.java#L464-L482
735
khuxtable/seaglass
src/main/java/com/seaglasslookandfeel/ui/SeaGlassSliderUI.java
SeaGlassSliderUI.valueForYPosition
public int valueForYPosition(int yPos) { int value; int minValue = slider.getMinimum(); int maxValue = slider.getMaximum(); int trackTop = trackRect.y + thumbRect.height / 2 + trackBorder; int trackBottom = trackRect.y + trackRect.height - thumbRect.height / 2 - trackBorder; ...
java
public int valueForYPosition(int yPos) { int value; int minValue = slider.getMinimum(); int maxValue = slider.getMaximum(); int trackTop = trackRect.y + thumbRect.height / 2 + trackBorder; int trackBottom = trackRect.y + trackRect.height - thumbRect.height / 2 - trackBorder; ...
[ "public", "int", "valueForYPosition", "(", "int", "yPos", ")", "{", "int", "value", ";", "int", "minValue", "=", "slider", ".", "getMinimum", "(", ")", ";", "int", "maxValue", "=", "slider", ".", "getMaximum", "(", ")", ";", "int", "trackTop", "=", "tr...
Returns a value give a y position. If yPos is past the track at the top or the bottom it will set the value to the min or max of the slider, depending if the slider is inverted or not.
[ "Returns", "a", "value", "give", "a", "y", "position", ".", "If", "yPos", "is", "past", "the", "track", "at", "the", "top", "or", "the", "bottom", "it", "will", "set", "the", "value", "to", "the", "min", "or", "max", "of", "the", "slider", "depending...
f25ecba622923d7b29b64cb7d6068dd8005989b3
https://github.com/khuxtable/seaglass/blob/f25ecba622923d7b29b64cb7d6068dd8005989b3/src/main/java/com/seaglasslookandfeel/ui/SeaGlassSliderUI.java#L617-L637
736
khuxtable/seaglass
src/main/java/com/seaglasslookandfeel/ui/SeaGlassSliderUI.java
SeaGlassSliderUI.valueForXPosition
public int valueForXPosition(int xPos) { int value; int minValue = slider.getMinimum(); int maxValue = slider.getMaximum(); int trackLeft = trackRect.x + thumbRect.width / 2 + trackBorder; int trackRight = trackRect.x + trackRect.width - thumbRect.width / 2 - trackBorder; ...
java
public int valueForXPosition(int xPos) { int value; int minValue = slider.getMinimum(); int maxValue = slider.getMaximum(); int trackLeft = trackRect.x + thumbRect.width / 2 + trackBorder; int trackRight = trackRect.x + trackRect.width - thumbRect.width / 2 - trackBorder; ...
[ "public", "int", "valueForXPosition", "(", "int", "xPos", ")", "{", "int", "value", ";", "int", "minValue", "=", "slider", ".", "getMinimum", "(", ")", ";", "int", "maxValue", "=", "slider", ".", "getMaximum", "(", ")", ";", "int", "trackLeft", "=", "t...
Returns a value give an x position. If xPos is past the track at the left or the right it will set the value to the min or max of the slider, depending if the slider is inverted or not.
[ "Returns", "a", "value", "give", "an", "x", "position", ".", "If", "xPos", "is", "past", "the", "track", "at", "the", "left", "or", "the", "right", "it", "will", "set", "the", "value", "to", "the", "min", "or", "max", "of", "the", "slider", "dependin...
f25ecba622923d7b29b64cb7d6068dd8005989b3
https://github.com/khuxtable/seaglass/blob/f25ecba622923d7b29b64cb7d6068dd8005989b3/src/main/java/com/seaglasslookandfeel/ui/SeaGlassSliderUI.java#L644-L664
737
khuxtable/seaglass
src/main/java/com/seaglasslookandfeel/painter/TextComponentPainter.java
TextComponentPainter.isPaintLineSeperators
private boolean isPaintLineSeperators(JComponent c) { boolean paintLines = c instanceof JTextArea; // Global settings String globalOverride = System.getProperty("SeaGlass.JTextArea.drawLineSeparator"); if (globalOverride != null && globalOverride.length() > 0) { paintLines =...
java
private boolean isPaintLineSeperators(JComponent c) { boolean paintLines = c instanceof JTextArea; // Global settings String globalOverride = System.getProperty("SeaGlass.JTextArea.drawLineSeparator"); if (globalOverride != null && globalOverride.length() > 0) { paintLines =...
[ "private", "boolean", "isPaintLineSeperators", "(", "JComponent", "c", ")", "{", "boolean", "paintLines", "=", "c", "instanceof", "JTextArea", ";", "// Global settings", "String", "globalOverride", "=", "System", ".", "getProperty", "(", "\"SeaGlass.JTextArea.drawLineSe...
Test if we should also paint the line seperators. @param c @return
[ "Test", "if", "we", "should", "also", "paint", "the", "line", "seperators", "." ]
f25ecba622923d7b29b64cb7d6068dd8005989b3
https://github.com/khuxtable/seaglass/blob/f25ecba622923d7b29b64cb7d6068dd8005989b3/src/main/java/com/seaglasslookandfeel/painter/TextComponentPainter.java#L163-L178
738
khuxtable/seaglass
src/main/java/com/seaglasslookandfeel/painter/TextComponentPainter.java
TextComponentPainter.paintBorder
private void paintBorder(Graphics2D g, JComponent c, int x, int y, int width, int height) { boolean useToolBarColors = isInToolBar(c); Shape s; if (focused) { s = shapeGenerator.createRoundRectangle(x - 2, y - 2, width + 3, height + 3, CornerSize.OUTER_FOCUS); g.setPai...
java
private void paintBorder(Graphics2D g, JComponent c, int x, int y, int width, int height) { boolean useToolBarColors = isInToolBar(c); Shape s; if (focused) { s = shapeGenerator.createRoundRectangle(x - 2, y - 2, width + 3, height + 3, CornerSize.OUTER_FOCUS); g.setPai...
[ "private", "void", "paintBorder", "(", "Graphics2D", "g", ",", "JComponent", "c", ",", "int", "x", ",", "int", "y", ",", "int", "width", ",", "int", "height", ")", "{", "boolean", "useToolBarColors", "=", "isInToolBar", "(", "c", ")", ";", "Shape", "s"...
Paint the border. @param g DOCUMENT ME! @param c DOCUMENT ME! @param x DOCUMENT ME! @param y DOCUMENT ME! @param width DOCUMENT ME! @param height DOCUMENT ME!
[ "Paint", "the", "border", "." ]
f25ecba622923d7b29b64cb7d6068dd8005989b3
https://github.com/khuxtable/seaglass/blob/f25ecba622923d7b29b64cb7d6068dd8005989b3/src/main/java/com/seaglasslookandfeel/painter/TextComponentPainter.java#L232-L253
739
khuxtable/seaglass
src/main/java/com/seaglasslookandfeel/painter/button/SegmentedButtonPainter.java
SegmentedButtonPainter.getButtonHeight
private int getButtonHeight(JComponent c, int height) { String scaleKey = SeaGlassStyle.getSizeVariant(c); int newHeight = 27; // If the key is natural, allow the button to scale. if (SeaGlassStyle.NATURAL_KEY.equals(scaleKey)) { return height; } else if (SeaGlas...
java
private int getButtonHeight(JComponent c, int height) { String scaleKey = SeaGlassStyle.getSizeVariant(c); int newHeight = 27; // If the key is natural, allow the button to scale. if (SeaGlassStyle.NATURAL_KEY.equals(scaleKey)) { return height; } else if (SeaGlas...
[ "private", "int", "getButtonHeight", "(", "JComponent", "c", ",", "int", "height", ")", "{", "String", "scaleKey", "=", "SeaGlassStyle", ".", "getSizeVariant", "(", "c", ")", ";", "int", "newHeight", "=", "27", ";", "// If the key is natural, allow the button to s...
Compute the new button height for drawing, forcing the button into a standard height. @param c the button. @param height the height requested. @return the new height.
[ "Compute", "the", "new", "button", "height", "for", "drawing", "forcing", "the", "button", "into", "a", "standard", "height", "." ]
f25ecba622923d7b29b64cb7d6068dd8005989b3
https://github.com/khuxtable/seaglass/blob/f25ecba622923d7b29b64cb7d6068dd8005989b3/src/main/java/com/seaglasslookandfeel/painter/button/SegmentedButtonPainter.java#L122-L146
740
khuxtable/seaglass
src/main/java/com/seaglasslookandfeel/painter/button/SegmentedButtonPainter.java
SegmentedButtonPainter.createOuterFocus
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, ...
java
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, ...
[ "protected", "Shape", "createOuterFocus", "(", "final", "SegmentType", "segmentType", ",", "final", "int", "x", ",", "final", "int", "y", ",", "final", "int", "w", ",", "final", "int", "h", ")", "{", "switch", "(", "segmentType", ")", "{", "case", "FIRST...
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 r...
[ "Create", "the", "shape", "for", "the", "outer", "focus", "ring", ".", "Designed", "to", "be", "drawn", "rather", "than", "filled", "." ]
f25ecba622923d7b29b64cb7d6068dd8005989b3
https://github.com/khuxtable/seaglass/blob/f25ecba622923d7b29b64cb7d6068dd8005989b3/src/main/java/com/seaglasslookandfeel/painter/button/SegmentedButtonPainter.java#L227-L244
741
khuxtable/seaglass
src/main/java/com/seaglasslookandfeel/util/PlatformUtils.java
PlatformUtils.isMac
public static boolean isMac() { if (System.getProperty(SEA_GLASS_OVERRIDE_OS_NAME) != null) { return System.getProperty(SEA_GLASS_OVERRIDE_OS_NAME).startsWith("Mac OS"); } return System.getProperty("os.name").startsWith("Mac OS"); }
java
public static boolean isMac() { if (System.getProperty(SEA_GLASS_OVERRIDE_OS_NAME) != null) { return System.getProperty(SEA_GLASS_OVERRIDE_OS_NAME).startsWith("Mac OS"); } return System.getProperty("os.name").startsWith("Mac OS"); }
[ "public", "static", "boolean", "isMac", "(", ")", "{", "if", "(", "System", ".", "getProperty", "(", "SEA_GLASS_OVERRIDE_OS_NAME", ")", "!=", "null", ")", "{", "return", "System", ".", "getProperty", "(", "SEA_GLASS_OVERRIDE_OS_NAME", ")", ".", "startsWith", "...
True if this JVM is running on a Mac. @return true if this JVM is running on a Mac.
[ "True", "if", "this", "JVM", "is", "running", "on", "a", "Mac", "." ]
f25ecba622923d7b29b64cb7d6068dd8005989b3
https://github.com/khuxtable/seaglass/blob/f25ecba622923d7b29b64cb7d6068dd8005989b3/src/main/java/com/seaglasslookandfeel/util/PlatformUtils.java#L73-L79
742
khuxtable/seaglass
src/main/java/com/seaglasslookandfeel/ui/SeaGlassComboBoxUI.java
SeaGlassComboBoxUI.paintCurrentValue
@Override public void paintCurrentValue(Graphics g, Rectangle bounds, boolean hasFocus) { ListCellRenderer renderer = comboBox.getRenderer(); Component c; c = renderer.getListCellRendererComponent(listBox, comboBox.getSelectedItem(), -1, false, false); // Fix for 4238829: should la...
java
@Override public void paintCurrentValue(Graphics g, Rectangle bounds, boolean hasFocus) { ListCellRenderer renderer = comboBox.getRenderer(); Component c; c = renderer.getListCellRendererComponent(listBox, comboBox.getSelectedItem(), -1, false, false); // Fix for 4238829: should la...
[ "@", "Override", "public", "void", "paintCurrentValue", "(", "Graphics", "g", ",", "Rectangle", "bounds", ",", "boolean", "hasFocus", ")", "{", "ListCellRenderer", "renderer", "=", "comboBox", ".", "getRenderer", "(", ")", ";", "Component", "c", ";", "c", "=...
Paints the currently selected item.
[ "Paints", "the", "currently", "selected", "item", "." ]
f25ecba622923d7b29b64cb7d6068dd8005989b3
https://github.com/khuxtable/seaglass/blob/f25ecba622923d7b29b64cb7d6068dd8005989b3/src/main/java/com/seaglasslookandfeel/ui/SeaGlassComboBoxUI.java#L349-L385
743
khuxtable/seaglass
src/main/java/com/seaglasslookandfeel/ui/SeaGlassComboBoxUI.java
SeaGlassComboBoxUI.getDefaultSize
@Override protected Dimension getDefaultSize() { SynthComboBoxRenderer r = new SynthComboBoxRenderer(); Dimension d = getSizeForComponent(r.getListCellRendererComponent(listBox, " ", -1, false, false)); return new Dimension(d.width, d.height); }
java
@Override protected Dimension getDefaultSize() { SynthComboBoxRenderer r = new SynthComboBoxRenderer(); Dimension d = getSizeForComponent(r.getListCellRendererComponent(listBox, " ", -1, false, false)); return new Dimension(d.width, d.height); }
[ "@", "Override", "protected", "Dimension", "getDefaultSize", "(", ")", "{", "SynthComboBoxRenderer", "r", "=", "new", "SynthComboBoxRenderer", "(", ")", ";", "Dimension", "d", "=", "getSizeForComponent", "(", "r", ".", "getListCellRendererComponent", "(", "listBox",...
Return the default size of an empty display area of the combo box using the current renderer and font. This method was overridden to use SynthComboBoxRenderer instead of DefaultListCellRenderer as the default renderer when calculating the size of the combo box. This is used in the case of the combo not having any data...
[ "Return", "the", "default", "size", "of", "an", "empty", "display", "area", "of", "the", "combo", "box", "using", "the", "current", "renderer", "and", "font", "." ]
f25ecba622923d7b29b64cb7d6068dd8005989b3
https://github.com/khuxtable/seaglass/blob/f25ecba622923d7b29b64cb7d6068dd8005989b3/src/main/java/com/seaglasslookandfeel/ui/SeaGlassComboBoxUI.java#L408-L413
744
khuxtable/seaglass
src/main/java/com/seaglasslookandfeel/effect/SeaGlassInternalShadowEffect.java
SeaGlassInternalShadowEffect.fill
public void fill(Graphics2D g, Shape s, boolean isRounded, boolean paintRightShadow) { if (isRounded) { fillInternalShadowRounded(g, s); } else { fillInternalShadow(g, s, paintRightShadow); } }
java
public void fill(Graphics2D g, Shape s, boolean isRounded, boolean paintRightShadow) { if (isRounded) { fillInternalShadowRounded(g, s); } else { fillInternalShadow(g, s, paintRightShadow); } }
[ "public", "void", "fill", "(", "Graphics2D", "g", ",", "Shape", "s", ",", "boolean", "isRounded", ",", "boolean", "paintRightShadow", ")", "{", "if", "(", "isRounded", ")", "{", "fillInternalShadowRounded", "(", "g", ",", "s", ")", ";", "}", "else", "{",...
Fill the shape with the internal shadow. @param g the Graphics context to paint with. @param s the shape to fill. This is only used for its bounds. @param isRounded {@code true} if the shape is rounded, {@code false} if it is rectangular. @param paintRightShadow {@code true} if the shape ...
[ "Fill", "the", "shape", "with", "the", "internal", "shadow", "." ]
f25ecba622923d7b29b64cb7d6068dd8005989b3
https://github.com/khuxtable/seaglass/blob/f25ecba622923d7b29b64cb7d6068dd8005989b3/src/main/java/com/seaglasslookandfeel/effect/SeaGlassInternalShadowEffect.java#L64-L70
745
khuxtable/seaglass
src/main/java/com/seaglasslookandfeel/effect/SeaGlassInternalShadowEffect.java
SeaGlassInternalShadowEffect.fillInternalShadow
private void fillInternalShadow(Graphics2D g, Shape s, boolean paintRightShadow) { Rectangle bounds = s.getBounds(); int x = bounds.x; int y = bounds.y; int w = bounds.width; int h = bounds.height; s = shapeGenerator.createRect...
java
private void fillInternalShadow(Graphics2D g, Shape s, boolean paintRightShadow) { Rectangle bounds = s.getBounds(); int x = bounds.x; int y = bounds.y; int w = bounds.width; int h = bounds.height; s = shapeGenerator.createRect...
[ "private", "void", "fillInternalShadow", "(", "Graphics2D", "g", ",", "Shape", "s", ",", "boolean", "paintRightShadow", ")", "{", "Rectangle", "bounds", "=", "s", ".", "getBounds", "(", ")", ";", "int", "x", "=", "bounds", ".", "x", ";", "int", "y", "=...
Fill a rectangular shadow. @param g the Graphics context to paint with. @param s the shape to fill. This is only used for its bounds. @param paintRightShadow {@code true} if the shape is rectangular and the rightmost shadow should be painted, {@code false} otherwise.
[ "Fill", "a", "rectangular", "shadow", "." ]
f25ecba622923d7b29b64cb7d6068dd8005989b3
https://github.com/khuxtable/seaglass/blob/f25ecba622923d7b29b64cb7d6068dd8005989b3/src/main/java/com/seaglasslookandfeel/effect/SeaGlassInternalShadowEffect.java#L82-L102
746
khuxtable/seaglass
src/main/java/com/seaglasslookandfeel/effect/SeaGlassInternalShadowEffect.java
SeaGlassInternalShadowEffect.fillInternalShadowRounded
private void fillInternalShadowRounded(Graphics2D g, Shape s) { g.setPaint(getRoundedShadowGradient(s)); g.fill(s); }
java
private void fillInternalShadowRounded(Graphics2D g, Shape s) { g.setPaint(getRoundedShadowGradient(s)); g.fill(s); }
[ "private", "void", "fillInternalShadowRounded", "(", "Graphics2D", "g", ",", "Shape", "s", ")", "{", "g", ".", "setPaint", "(", "getRoundedShadowGradient", "(", "s", ")", ")", ";", "g", ".", "fill", "(", "s", ")", ";", "}" ]
Fill a rounded shadow. @param g the Graphics context to paint with. @param s the shape to fill. This is only used for its bounds.
[ "Fill", "a", "rounded", "shadow", "." ]
f25ecba622923d7b29b64cb7d6068dd8005989b3
https://github.com/khuxtable/seaglass/blob/f25ecba622923d7b29b64cb7d6068dd8005989b3/src/main/java/com/seaglasslookandfeel/effect/SeaGlassInternalShadowEffect.java#L110-L113
747
khuxtable/seaglass
src/main/java/com/seaglasslookandfeel/effect/SeaGlassInternalShadowEffect.java
SeaGlassInternalShadowEffect.getRoundedShadowGradient
public Paint getRoundedShadowGradient(Shape s) { Rectangle r = s.getBounds(); int x = r.x + r.width / 2; int y1 = r.y; float frac = 1.0f / r.height; int y2 = r.y + r.height; return new LinearGradientPaint(x, y1, x, y2, (new float[] { 0f, f...
java
public Paint getRoundedShadowGradient(Shape s) { Rectangle r = s.getBounds(); int x = r.x + r.width / 2; int y1 = r.y; float frac = 1.0f / r.height; int y2 = r.y + r.height; return new LinearGradientPaint(x, y1, x, y2, (new float[] { 0f, f...
[ "public", "Paint", "getRoundedShadowGradient", "(", "Shape", "s", ")", "{", "Rectangle", "r", "=", "s", ".", "getBounds", "(", ")", ";", "int", "x", "=", "r", ".", "x", "+", "r", ".", "width", "/", "2", ";", "int", "y1", "=", "r", ".", "y", ";"...
Create the gradient for a rounded shadow. @param s the shape of the gradient. This is only used for its bounds. @return the gradient.
[ "Create", "the", "gradient", "for", "a", "rounded", "shadow", "." ]
f25ecba622923d7b29b64cb7d6068dd8005989b3
https://github.com/khuxtable/seaglass/blob/f25ecba622923d7b29b64cb7d6068dd8005989b3/src/main/java/com/seaglasslookandfeel/effect/SeaGlassInternalShadowEffect.java#L122-L131
748
khuxtable/seaglass
src/main/java/com/seaglasslookandfeel/effect/SeaGlassInternalShadowEffect.java
SeaGlassInternalShadowEffect.getTopShadowGradient
public Paint getTopShadowGradient(Shape s) { Rectangle2D bounds = s.getBounds2D(); float minY = (float) bounds.getMinY(); float maxY = (float) bounds.getMaxY(); float midX = (float) bounds.getCenterX(); return new LinearGradientPaint(midX, minY, midX, max...
java
public Paint getTopShadowGradient(Shape s) { Rectangle2D bounds = s.getBounds2D(); float minY = (float) bounds.getMinY(); float maxY = (float) bounds.getMaxY(); float midX = (float) bounds.getCenterX(); return new LinearGradientPaint(midX, minY, midX, max...
[ "public", "Paint", "getTopShadowGradient", "(", "Shape", "s", ")", "{", "Rectangle2D", "bounds", "=", "s", ".", "getBounds2D", "(", ")", ";", "float", "minY", "=", "(", "float", ")", "bounds", ".", "getMinY", "(", ")", ";", "float", "maxY", "=", "(", ...
Create the gradient for the top of a rectangular shadow. @param s the shape of the gradient. This is only used for its bounds. @return the gradient.
[ "Create", "the", "gradient", "for", "the", "top", "of", "a", "rectangular", "shadow", "." ]
f25ecba622923d7b29b64cb7d6068dd8005989b3
https://github.com/khuxtable/seaglass/blob/f25ecba622923d7b29b64cb7d6068dd8005989b3/src/main/java/com/seaglasslookandfeel/effect/SeaGlassInternalShadowEffect.java#L140-L147
749
khuxtable/seaglass
src/main/java/com/seaglasslookandfeel/effect/SeaGlassInternalShadowEffect.java
SeaGlassInternalShadowEffect.getLeftShadowGradient
public Paint getLeftShadowGradient(Shape s) { Rectangle2D bounds = s.getBounds2D(); float minX = (float) bounds.getMinX(); float maxX = (float) bounds.getMaxX(); float midY = (float) bounds.getCenterY(); return new LinearGradientPaint(minX, midY, maxX, mi...
java
public Paint getLeftShadowGradient(Shape s) { Rectangle2D bounds = s.getBounds2D(); float minX = (float) bounds.getMinX(); float maxX = (float) bounds.getMaxX(); float midY = (float) bounds.getCenterY(); return new LinearGradientPaint(minX, midY, maxX, mi...
[ "public", "Paint", "getLeftShadowGradient", "(", "Shape", "s", ")", "{", "Rectangle2D", "bounds", "=", "s", ".", "getBounds2D", "(", ")", ";", "float", "minX", "=", "(", "float", ")", "bounds", ".", "getMinX", "(", ")", ";", "float", "maxX", "=", "(", ...
Create the gradient for the left of a rectangular shadow. @param s the shape of the gradient. This is only used for its bounds. @return the gradient.
[ "Create", "the", "gradient", "for", "the", "left", "of", "a", "rectangular", "shadow", "." ]
f25ecba622923d7b29b64cb7d6068dd8005989b3
https://github.com/khuxtable/seaglass/blob/f25ecba622923d7b29b64cb7d6068dd8005989b3/src/main/java/com/seaglasslookandfeel/effect/SeaGlassInternalShadowEffect.java#L156-L164
750
khuxtable/seaglass
src/main/java/com/seaglasslookandfeel/DerivedColor.java
DerivedColor.rederiveColor
private void rederiveColor() { Color src = UIManager.getColor(uiDefaultParentName); if (src != null) { float[] tmp = Color.RGBtoHSB(src.getRed(), src.getGreen(), src.getBlue(), null); // apply offsets tmp[0] = clamp(tmp[0] + hOffset); tmp[1] = clamp(tmp[1]...
java
private void rederiveColor() { Color src = UIManager.getColor(uiDefaultParentName); if (src != null) { float[] tmp = Color.RGBtoHSB(src.getRed(), src.getGreen(), src.getBlue(), null); // apply offsets tmp[0] = clamp(tmp[0] + hOffset); tmp[1] = clamp(tmp[1]...
[ "private", "void", "rederiveColor", "(", ")", "{", "Color", "src", "=", "UIManager", ".", "getColor", "(", "uiDefaultParentName", ")", ";", "if", "(", "src", "!=", "null", ")", "{", "float", "[", "]", "tmp", "=", "Color", ".", "RGBtoHSB", "(", "src", ...
Recalculate the derived color from the UIManager parent color and offsets
[ "Recalculate", "the", "derived", "color", "from", "the", "UIManager", "parent", "color", "and", "offsets" ]
f25ecba622923d7b29b64cb7d6068dd8005989b3
https://github.com/khuxtable/seaglass/blob/f25ecba622923d7b29b64cb7d6068dd8005989b3/src/main/java/com/seaglasslookandfeel/DerivedColor.java#L54-L72
751
khuxtable/seaglass
src/main/java/com/seaglasslookandfeel/painter/button/TexturedButtonPainter.java
TexturedButtonPainter.getTexturedButtonBorderColors
public TwoColors getTexturedButtonBorderColors(CommonControlState type) { switch (type) { case DISABLED: return texturedButtonBorderDisabled; case DISABLED_SELECTED: return texturedButtonBorderDisabledSelected; case ENABLED: return texturedButtonBor...
java
public TwoColors getTexturedButtonBorderColors(CommonControlState type) { switch (type) { case DISABLED: return texturedButtonBorderDisabled; case DISABLED_SELECTED: return texturedButtonBorderDisabledSelected; case ENABLED: return texturedButtonBor...
[ "public", "TwoColors", "getTexturedButtonBorderColors", "(", "CommonControlState", "type", ")", "{", "switch", "(", "type", ")", "{", "case", "DISABLED", ":", "return", "texturedButtonBorderDisabled", ";", "case", "DISABLED_SELECTED", ":", "return", "texturedButtonBorde...
Get the colors for the border. @param type the button type. Derived from state. @return a two-tuple of colors for top and bottom gradient.
[ "Get", "the", "colors", "for", "the", "border", "." ]
f25ecba622923d7b29b64cb7d6068dd8005989b3
https://github.com/khuxtable/seaglass/blob/f25ecba622923d7b29b64cb7d6068dd8005989b3/src/main/java/com/seaglasslookandfeel/painter/button/TexturedButtonPainter.java#L119-L148
752
khuxtable/seaglass
src/main/java/com/seaglasslookandfeel/painter/button/TexturedButtonPainter.java
TexturedButtonPainter.getTexturedButtonInteriorColors
public TwoColors getTexturedButtonInteriorColors(CommonControlState type) { switch (type) { case DISABLED: return texturedButtonInteriorDisabled; case DISABLED_SELECTED: return texturedButtonInteriorDisabledSelected; case ENABLED: return texturedBut...
java
public TwoColors getTexturedButtonInteriorColors(CommonControlState type) { switch (type) { case DISABLED: return texturedButtonInteriorDisabled; case DISABLED_SELECTED: return texturedButtonInteriorDisabledSelected; case ENABLED: return texturedBut...
[ "public", "TwoColors", "getTexturedButtonInteriorColors", "(", "CommonControlState", "type", ")", "{", "switch", "(", "type", ")", "{", "case", "DISABLED", ":", "return", "texturedButtonInteriorDisabled", ";", "case", "DISABLED_SELECTED", ":", "return", "texturedButtonI...
Get the colors for the interior. @param type the button type. Derived from the state. @return a two-tuple of colors for top and bottom gradient.
[ "Get", "the", "colors", "for", "the", "interior", "." ]
f25ecba622923d7b29b64cb7d6068dd8005989b3
https://github.com/khuxtable/seaglass/blob/f25ecba622923d7b29b64cb7d6068dd8005989b3/src/main/java/com/seaglasslookandfeel/painter/button/TexturedButtonPainter.java#L157-L186
753
khuxtable/seaglass
src/main/java/com/seaglasslookandfeel/painter/TitlePaneCloseButtonPainter.java
TitlePaneCloseButtonPainter.decodeCloseGradient
private Paint decodeCloseGradient(Shape s, Color top, Color bottom) { Rectangle r = s.getBounds(); int width = r.width; int height = r.height; return createGradient(r.x + width / 2, r.y, r.x + width / 2, r.y + height - 1, new float[] { 0f, 1f }, new Color[] { top, bott...
java
private Paint decodeCloseGradient(Shape s, Color top, Color bottom) { Rectangle r = s.getBounds(); int width = r.width; int height = r.height; return createGradient(r.x + width / 2, r.y, r.x + width / 2, r.y + height - 1, new float[] { 0f, 1f }, new Color[] { top, bott...
[ "private", "Paint", "decodeCloseGradient", "(", "Shape", "s", ",", "Color", "top", ",", "Color", "bottom", ")", "{", "Rectangle", "r", "=", "s", ".", "getBounds", "(", ")", ";", "int", "width", "=", "r", ".", "width", ";", "int", "height", "=", "r", ...
Create the gradient for the close button. @param s the shape to fill. @param top the top color. @param bottom the bottom color. @return the gradient.
[ "Create", "the", "gradient", "for", "the", "close", "button", "." ]
f25ecba622923d7b29b64cb7d6068dd8005989b3
https://github.com/khuxtable/seaglass/blob/f25ecba622923d7b29b64cb7d6068dd8005989b3/src/main/java/com/seaglasslookandfeel/painter/TitlePaneCloseButtonPainter.java#L186-L192
754
khuxtable/seaglass
src/main/java/com/seaglasslookandfeel/painter/TitlePaneCloseButtonPainter.java
TitlePaneCloseButtonPainter.decodeEdge
private Shape decodeEdge(int width, int height) { path.reset(); path.moveTo(width - 2, 0); path.lineTo(width - 2, height - 4); path.lineTo(width - 4, height - 2); path.lineTo(0, height - 2); return path; }
java
private Shape decodeEdge(int width, int height) { path.reset(); path.moveTo(width - 2, 0); path.lineTo(width - 2, height - 4); path.lineTo(width - 4, height - 2); path.lineTo(0, height - 2); return path; }
[ "private", "Shape", "decodeEdge", "(", "int", "width", ",", "int", "height", ")", "{", "path", ".", "reset", "(", ")", ";", "path", ".", "moveTo", "(", "width", "-", "2", ",", "0", ")", ";", "path", ".", "lineTo", "(", "width", "-", "2", ",", "...
Create the edge of the button. @param width the width. @param height the height. @return the shape of the edge.
[ "Create", "the", "edge", "of", "the", "button", "." ]
f25ecba622923d7b29b64cb7d6068dd8005989b3
https://github.com/khuxtable/seaglass/blob/f25ecba622923d7b29b64cb7d6068dd8005989b3/src/main/java/com/seaglasslookandfeel/painter/TitlePaneCloseButtonPainter.java#L222-L230
755
khuxtable/seaglass
src/main/java/com/seaglasslookandfeel/painter/TitlePaneCloseButtonPainter.java
TitlePaneCloseButtonPainter.decodeShadow
private Shape decodeShadow(int width, int height) { path.reset(); path.moveTo(width - 1, 0); path.lineTo(width - 1, height - 4); path.lineTo(width - 4, height - 1); path.lineTo(0, height - 1); return path; }
java
private Shape decodeShadow(int width, int height) { path.reset(); path.moveTo(width - 1, 0); path.lineTo(width - 1, height - 4); path.lineTo(width - 4, height - 1); path.lineTo(0, height - 1); return path; }
[ "private", "Shape", "decodeShadow", "(", "int", "width", ",", "int", "height", ")", "{", "path", ".", "reset", "(", ")", ";", "path", ".", "moveTo", "(", "width", "-", "1", ",", "0", ")", ";", "path", ".", "lineTo", "(", "width", "-", "1", ",", ...
Create the shadow for the button. @param width the width. @param height the height. @return the shape of the shadow.
[ "Create", "the", "shadow", "for", "the", "button", "." ]
f25ecba622923d7b29b64cb7d6068dd8005989b3
https://github.com/khuxtable/seaglass/blob/f25ecba622923d7b29b64cb7d6068dd8005989b3/src/main/java/com/seaglasslookandfeel/painter/TitlePaneCloseButtonPainter.java#L240-L248
756
khuxtable/seaglass
src/main/java/com/seaglasslookandfeel/painter/TitlePaneCloseButtonPainter.java
TitlePaneCloseButtonPainter.decodeMarkBorder
private Shape decodeMarkBorder(int width, int height) { int left = (width - 3) / 2 - 5; int top = (height - 2) / 2 - 5; path.reset(); path.moveTo(left + 1, top + 0); path.lineTo(left + 3, top + 0); path.pointAt(left + 4, top + 1); path.pointAt(left + 5, top + 2)...
java
private Shape decodeMarkBorder(int width, int height) { int left = (width - 3) / 2 - 5; int top = (height - 2) / 2 - 5; path.reset(); path.moveTo(left + 1, top + 0); path.lineTo(left + 3, top + 0); path.pointAt(left + 4, top + 1); path.pointAt(left + 5, top + 2)...
[ "private", "Shape", "decodeMarkBorder", "(", "int", "width", ",", "int", "height", ")", "{", "int", "left", "=", "(", "width", "-", "3", ")", "/", "2", "-", "5", ";", "int", "top", "=", "(", "height", "-", "2", ")", "/", "2", "-", "5", ";", "...
Create the shape for the mark border. @param width the width. @param height the height. @return the shape of the mark border.
[ "Create", "the", "shape", "for", "the", "mark", "border", "." ]
f25ecba622923d7b29b64cb7d6068dd8005989b3
https://github.com/khuxtable/seaglass/blob/f25ecba622923d7b29b64cb7d6068dd8005989b3/src/main/java/com/seaglasslookandfeel/painter/TitlePaneCloseButtonPainter.java#L258-L295
757
khuxtable/seaglass
src/main/java/com/seaglasslookandfeel/painter/TitlePaneCloseButtonPainter.java
TitlePaneCloseButtonPainter.decodeMarkInterior
private Shape decodeMarkInterior(int width, int height) { int left = (width - 3) / 2 - 5; int top = (height - 2) / 2 - 5; path.reset(); path.moveTo(left + 1, top + 1); path.lineTo(left + 4, top + 1); path.lineTo(left + 5, top + 3); path.lineTo(left + 7, top + 1)...
java
private Shape decodeMarkInterior(int width, int height) { int left = (width - 3) / 2 - 5; int top = (height - 2) / 2 - 5; path.reset(); path.moveTo(left + 1, top + 1); path.lineTo(left + 4, top + 1); path.lineTo(left + 5, top + 3); path.lineTo(left + 7, top + 1)...
[ "private", "Shape", "decodeMarkInterior", "(", "int", "width", ",", "int", "height", ")", "{", "int", "left", "=", "(", "width", "-", "3", ")", "/", "2", "-", "5", ";", "int", "top", "=", "(", "height", "-", "2", ")", "/", "2", "-", "5", ";", ...
Create the shape for the mark interior. @param width the width. @param height the height. @return the shape of the mark interior.
[ "Create", "the", "shape", "for", "the", "mark", "interior", "." ]
f25ecba622923d7b29b64cb7d6068dd8005989b3
https://github.com/khuxtable/seaglass/blob/f25ecba622923d7b29b64cb7d6068dd8005989b3/src/main/java/com/seaglasslookandfeel/painter/TitlePaneCloseButtonPainter.java#L305-L327
758
khuxtable/seaglass
src/main/java/com/seaglasslookandfeel/ui/SeaGlassProgressBarUI.java
SeaGlassProgressBarUI.paintProgressIndicator
private void paintProgressIndicator(SeaGlassContext context, Graphics2D g2d, int width, int height, int size, boolean isFinished) { JProgressBar pBar = (JProgressBar) context.getComponent(); if (tileWhenIndeterminate && pBar.isIndeterminate()) { double offsetFraction = (double) getAnimation...
java
private void paintProgressIndicator(SeaGlassContext context, Graphics2D g2d, int width, int height, int size, boolean isFinished) { JProgressBar pBar = (JProgressBar) context.getComponent(); if (tileWhenIndeterminate && pBar.isIndeterminate()) { double offsetFraction = (double) getAnimation...
[ "private", "void", "paintProgressIndicator", "(", "SeaGlassContext", "context", ",", "Graphics2D", "g2d", ",", "int", "width", ",", "int", "height", ",", "int", "size", ",", "boolean", "isFinished", ")", "{", "JProgressBar", "pBar", "=", "(", "JProgressBar", "...
Paint the actual internal progress bar. @param context @param g2d @param width @param height @param size @param isFinished
[ "Paint", "the", "actual", "internal", "progress", "bar", "." ]
f25ecba622923d7b29b64cb7d6068dd8005989b3
https://github.com/khuxtable/seaglass/blob/f25ecba622923d7b29b64cb7d6068dd8005989b3/src/main/java/com/seaglasslookandfeel/ui/SeaGlassProgressBarUI.java#L323-L363
759
khuxtable/seaglass
src/main/java/com/seaglasslookandfeel/painter/ButtonPainter.java
ButtonPainter.getButtonPainter
private ButtonVariantPainter getButtonPainter(JComponent c) { Object buttonType = c.getClientProperty("JButton.buttonType"); ButtonVariantPainter button = standard; if ("textured".equals(buttonType) || "segmentedTextured".equals(buttonType)) { button = textured; ...
java
private ButtonVariantPainter getButtonPainter(JComponent c) { Object buttonType = c.getClientProperty("JButton.buttonType"); ButtonVariantPainter button = standard; if ("textured".equals(buttonType) || "segmentedTextured".equals(buttonType)) { button = textured; ...
[ "private", "ButtonVariantPainter", "getButtonPainter", "(", "JComponent", "c", ")", "{", "Object", "buttonType", "=", "c", ".", "getClientProperty", "(", "\"JButton.buttonType\"", ")", ";", "ButtonVariantPainter", "button", "=", "standard", ";", "if", "(", "\"textur...
Determine the button painter variant from the component's client property. @param c the component. @return the button painter variant.
[ "Determine", "the", "button", "painter", "variant", "from", "the", "component", "s", "client", "property", "." ]
f25ecba622923d7b29b64cb7d6068dd8005989b3
https://github.com/khuxtable/seaglass/blob/f25ecba622923d7b29b64cb7d6068dd8005989b3/src/main/java/com/seaglasslookandfeel/painter/ButtonPainter.java#L100-L109
760
khuxtable/seaglass
src/main/java/com/seaglasslookandfeel/component/TableScrollPaneCorner.java
TableScrollPaneCorner.paintComponent
@Override protected void paintComponent(Graphics g) { SeaGlassPainter painter = (SeaGlassPainter) UIManager.get("TableHeader:\"TableHeader.renderer\"[Enabled].backgroundPainter"); if (painter != null) { Graphics2D g2d = (Graphics2D) g; painter.paint(g2d, this, getWidth() +...
java
@Override protected void paintComponent(Graphics g) { SeaGlassPainter painter = (SeaGlassPainter) UIManager.get("TableHeader:\"TableHeader.renderer\"[Enabled].backgroundPainter"); if (painter != null) { Graphics2D g2d = (Graphics2D) g; painter.paint(g2d, this, getWidth() +...
[ "@", "Override", "protected", "void", "paintComponent", "(", "Graphics", "g", ")", "{", "SeaGlassPainter", "painter", "=", "(", "SeaGlassPainter", ")", "UIManager", ".", "get", "(", "\"TableHeader:\\\"TableHeader.renderer\\\"[Enabled].backgroundPainter\"", ")", ";", "if...
Paint the component using the Nimbus Table Header Background Painter @param g the Graphics context to paint with.
[ "Paint", "the", "component", "using", "the", "Nimbus", "Table", "Header", "Background", "Painter" ]
f25ecba622923d7b29b64cb7d6068dd8005989b3
https://github.com/khuxtable/seaglass/blob/f25ecba622923d7b29b64cb7d6068dd8005989b3/src/main/java/com/seaglasslookandfeel/component/TableScrollPaneCorner.java#L47-L57
761
khuxtable/seaglass
src/main/java/com/seaglasslookandfeel/SeaGlassContext.java
SeaGlassContext.getContext
public static SeaGlassContext getContext(Class type, JComponent component, Region region, SynthStyle style, int state) { SeaGlassContext context = null; synchronized (contextMap) { List instances = (List) contextMap.get(type); if (instances != null) { int size =...
java
public static SeaGlassContext getContext(Class type, JComponent component, Region region, SynthStyle style, int state) { SeaGlassContext context = null; synchronized (contextMap) { List instances = (List) contextMap.get(type); if (instances != null) { int size =...
[ "public", "static", "SeaGlassContext", "getContext", "(", "Class", "type", ",", "JComponent", "component", ",", "Region", "region", ",", "SynthStyle", "style", ",", "int", "state", ")", "{", "SeaGlassContext", "context", "=", "null", ";", "synchronized", "(", ...
The method used to get a context. @param type the class of the context. @param component the component. @param region the region. @param style the style. @param state the state. @return the newly constructed context, corresponding to the arguments.
[ "The", "method", "used", "to", "get", "a", "context", "." ]
f25ecba622923d7b29b64cb7d6068dd8005989b3
https://github.com/khuxtable/seaglass/blob/f25ecba622923d7b29b64cb7d6068dd8005989b3/src/main/java/com/seaglasslookandfeel/SeaGlassContext.java#L127-L156
762
khuxtable/seaglass
src/main/java/com/seaglasslookandfeel/SeaGlassContext.java
SeaGlassContext.releaseContext
static void releaseContext(SeaGlassContext context) { synchronized (contextMap) { List instances = (List) contextMap.get(context.getClass()); if (instances == null) { instances = new ArrayList(5); contextMap.put(context.getClass(), instances); ...
java
static void releaseContext(SeaGlassContext context) { synchronized (contextMap) { List instances = (List) contextMap.get(context.getClass()); if (instances == null) { instances = new ArrayList(5); contextMap.put(context.getClass(), instances); ...
[ "static", "void", "releaseContext", "(", "SeaGlassContext", "context", ")", "{", "synchronized", "(", "contextMap", ")", "{", "List", "instances", "=", "(", "List", ")", "contextMap", ".", "get", "(", "context", ".", "getClass", "(", ")", ")", ";", "if", ...
Release a context for re-use. @param context the context to release.
[ "Release", "a", "context", "for", "re", "-", "use", "." ]
f25ecba622923d7b29b64cb7d6068dd8005989b3
https://github.com/khuxtable/seaglass/blob/f25ecba622923d7b29b64cb7d6068dd8005989b3/src/main/java/com/seaglasslookandfeel/SeaGlassContext.java#L163-L174
763
khuxtable/seaglass
src/main/java/com/seaglasslookandfeel/SeaGlassContext.java
SeaGlassContext.reset
@SuppressWarnings("all") public void reset(JComponent component, Region region, SynthStyle style, int state) { this.component = component; this.region = region; this.style = style; this.state = state; }
java
@SuppressWarnings("all") public void reset(JComponent component, Region region, SynthStyle style, int state) { this.component = component; this.region = region; this.style = style; this.state = state; }
[ "@", "SuppressWarnings", "(", "\"all\"", ")", "public", "void", "reset", "(", "JComponent", "component", ",", "Region", "region", ",", "SynthStyle", "style", ",", "int", "state", ")", "{", "this", ".", "component", "=", "component", ";", "this", ".", "regi...
Resets the state of the Context. @param component the new component. @param region the new region. @param style the new style. @param state the new state.
[ "Resets", "the", "state", "of", "the", "Context", "." ]
f25ecba622923d7b29b64cb7d6068dd8005989b3
https://github.com/khuxtable/seaglass/blob/f25ecba622923d7b29b64cb7d6068dd8005989b3/src/main/java/com/seaglasslookandfeel/SeaGlassContext.java#L256-L262
764
khuxtable/seaglass
src/main/java/com/seaglasslookandfeel/SeaGlassContext.java
SeaGlassContext.getPainter
@SuppressWarnings("all") public SynthPainter getPainter() { SynthPainter painter = getStyle().getPainter(this); if (painter != null) { return painter; } return EMPTY_PAINTER; }
java
@SuppressWarnings("all") public SynthPainter getPainter() { SynthPainter painter = getStyle().getPainter(this); if (painter != null) { return painter; } return EMPTY_PAINTER; }
[ "@", "SuppressWarnings", "(", "\"all\"", ")", "public", "SynthPainter", "getPainter", "(", ")", "{", "SynthPainter", "painter", "=", "getStyle", "(", ")", ".", "getPainter", "(", "this", ")", ";", "if", "(", "painter", "!=", "null", ")", "{", "return", "...
Convenience method to get the Painter from the current SynthStyle. This will NEVER return null. @return the painter for the style and context, otherwise the empty painter.
[ "Convenience", "method", "to", "get", "the", "Painter", "from", "the", "current", "SynthStyle", ".", "This", "will", "NEVER", "return", "null", "." ]
f25ecba622923d7b29b64cb7d6068dd8005989b3
https://github.com/khuxtable/seaglass/blob/f25ecba622923d7b29b64cb7d6068dd8005989b3/src/main/java/com/seaglasslookandfeel/SeaGlassContext.java#L281-L290
765
khuxtable/seaglass
src/main/java/com/seaglasslookandfeel/SeaGlassStyle.java
SeaGlassStyle.getSizeVariant
public static String getSizeVariant(JComponent c) { String sizeVariant = System.getProperty("JComponent.sizeVariant"); String componentSizeVariant = (String)c.getClientProperty("JComponent.sizeVariant"); if (componentSizeVariant != null) { sizeVariant = componentSizeVariant; ...
java
public static String getSizeVariant(JComponent c) { String sizeVariant = System.getProperty("JComponent.sizeVariant"); String componentSizeVariant = (String)c.getClientProperty("JComponent.sizeVariant"); if (componentSizeVariant != null) { sizeVariant = componentSizeVariant; ...
[ "public", "static", "String", "getSizeVariant", "(", "JComponent", "c", ")", "{", "String", "sizeVariant", "=", "System", ".", "getProperty", "(", "\"JComponent.sizeVariant\"", ")", ";", "String", "componentSizeVariant", "=", "(", "String", ")", "c", ".", "getCl...
Gets the size variant that is applicable for the given component. @param c @return
[ "Gets", "the", "size", "variant", "that", "is", "applicable", "for", "the", "given", "component", "." ]
f25ecba622923d7b29b64cb7d6068dd8005989b3
https://github.com/khuxtable/seaglass/blob/f25ecba622923d7b29b64cb7d6068dd8005989b3/src/main/java/com/seaglasslookandfeel/SeaGlassStyle.java#L168-L175
766
khuxtable/seaglass
src/main/java/com/seaglasslookandfeel/SeaGlassStyle.java
SeaGlassStyle.parsePrefix
static String parsePrefix(String key) { if (key == null) return null; boolean inquotes = false; for (int i = 0; i < key.length(); i++) { char c = key.charAt(i); if (c == '"') { inquotes = !inquotes; } else if ((c == '[' || c == '...
java
static String parsePrefix(String key) { if (key == null) return null; boolean inquotes = false; for (int i = 0; i < key.length(); i++) { char c = key.charAt(i); if (c == '"') { inquotes = !inquotes; } else if ((c == '[' || c == '...
[ "static", "String", "parsePrefix", "(", "String", "key", ")", "{", "if", "(", "key", "==", "null", ")", "return", "null", ";", "boolean", "inquotes", "=", "false", ";", "for", "(", "int", "i", "=", "0", ";", "i", "<", "key", ".", "length", "(", "...
Internal method to parse a style prefix. @param key the key to parse. @return the prefix portion of the key.
[ "Internal", "method", "to", "parse", "a", "style", "prefix", "." ]
f25ecba622923d7b29b64cb7d6068dd8005989b3
https://github.com/khuxtable/seaglass/blob/f25ecba622923d7b29b64cb7d6068dd8005989b3/src/main/java/com/seaglasslookandfeel/SeaGlassStyle.java#L329-L346
767
khuxtable/seaglass
src/main/java/com/seaglasslookandfeel/SeaGlassStyle.java
SeaGlassStyle.uninitialize
static void uninitialize() { // get the appcontext that we've stored data in AppContext ctx = AppContext.getAppContext(); // get the pcl stored in app context PropertyChangeListener pcl = (PropertyChangeListener) ctx.get("SeaGlassStyle.defaults.pcl"); // if the pcl exists, unin...
java
static void uninitialize() { // get the appcontext that we've stored data in AppContext ctx = AppContext.getAppContext(); // get the pcl stored in app context PropertyChangeListener pcl = (PropertyChangeListener) ctx.get("SeaGlassStyle.defaults.pcl"); // if the pcl exists, unin...
[ "static", "void", "uninitialize", "(", ")", "{", "// get the appcontext that we've stored data in", "AppContext", "ctx", "=", "AppContext", ".", "getAppContext", "(", ")", ";", "// get the pcl stored in app context", "PropertyChangeListener", "pcl", "=", "(", "PropertyChang...
Called by SeaGlassLookAndFeel when the look and feel is being uninstalled. Performs general cleanup of any app-context specific data.
[ "Called", "by", "SeaGlassLookAndFeel", "when", "the", "look", "and", "feel", "is", "being", "uninstalled", ".", "Performs", "general", "cleanup", "of", "any", "app", "-", "context", "specific", "data", "." ]
f25ecba622923d7b29b64cb7d6068dd8005989b3
https://github.com/khuxtable/seaglass/blob/f25ecba622923d7b29b64cb7d6068dd8005989b3/src/main/java/com/seaglasslookandfeel/SeaGlassStyle.java#L352-L367
768
khuxtable/seaglass
src/main/java/com/seaglasslookandfeel/SeaGlassStyle.java
SeaGlassStyle.validate
private void validate() { // a non-null values object is the flag we use to determine whether // to reparse from UIManager. if (values != null) return; // reconstruct this SeaGlassStyle based on the entries in the UIManager // and possibly based on any overrides with...
java
private void validate() { // a non-null values object is the flag we use to determine whether // to reparse from UIManager. if (values != null) return; // reconstruct this SeaGlassStyle based on the entries in the UIManager // and possibly based on any overrides with...
[ "private", "void", "validate", "(", ")", "{", "// a non-null values object is the flag we use to determine whether", "// to reparse from UIManager.", "if", "(", "values", "!=", "null", ")", "return", ";", "// reconstruct this SeaGlassStyle based on the entries in the UIManager", "/...
Pulls data out of UIDefaults, if it has not done so already, and sets up the internal state.
[ "Pulls", "data", "out", "of", "UIDefaults", "if", "it", "has", "not", "done", "so", "already", "and", "sets", "up", "the", "internal", "state", "." ]
f25ecba622923d7b29b64cb7d6068dd8005989b3
https://github.com/khuxtable/seaglass/blob/f25ecba622923d7b29b64cb7d6068dd8005989b3/src/main/java/com/seaglasslookandfeel/SeaGlassStyle.java#L373-L487
769
khuxtable/seaglass
src/main/java/com/seaglasslookandfeel/SeaGlassStyle.java
SeaGlassStyle.getPainter
private SeaGlassPainter getPainter(TreeMap<String, Object> defaults, String key) { Object p = defaults.get(key); if (p instanceof UIDefaults.LazyValue) { p = ((UIDefaults.LazyValue) p).createValue(UIManager.getDefaults()); } return (p instanceof SeaGlassPainter ? (SeaGlassP...
java
private SeaGlassPainter getPainter(TreeMap<String, Object> defaults, String key) { Object p = defaults.get(key); if (p instanceof UIDefaults.LazyValue) { p = ((UIDefaults.LazyValue) p).createValue(UIManager.getDefaults()); } return (p instanceof SeaGlassPainter ? (SeaGlassP...
[ "private", "SeaGlassPainter", "getPainter", "(", "TreeMap", "<", "String", ",", "Object", ">", "defaults", ",", "String", "key", ")", "{", "Object", "p", "=", "defaults", ".", "get", "(", "key", ")", ";", "if", "(", "p", "instanceof", "UIDefaults", ".", ...
Determine the painter given the defaults and a key. @param defaults the defaults. @param key the key. @return the painter, if any can be found, {@code null} otherwise.
[ "Determine", "the", "painter", "given", "the", "defaults", "and", "a", "key", "." ]
f25ecba622923d7b29b64cb7d6068dd8005989b3
https://github.com/khuxtable/seaglass/blob/f25ecba622923d7b29b64cb7d6068dd8005989b3/src/main/java/com/seaglasslookandfeel/SeaGlassStyle.java#L755-L763
770
khuxtable/seaglass
src/main/java/com/seaglasslookandfeel/SeaGlassStyle.java
SeaGlassStyle.getInsets
@Override public Insets getInsets(SynthContext ctx, Insets in) { if (in == null) { in = new Insets(0, 0, 0, 0); } Values v = getValues(ctx); if (v.contentMargins == null) { in.bottom = in.top = in.left = in.right = 0; return in; } else {...
java
@Override public Insets getInsets(SynthContext ctx, Insets in) { if (in == null) { in = new Insets(0, 0, 0, 0); } Values v = getValues(ctx); if (v.contentMargins == null) { in.bottom = in.top = in.left = in.right = 0; return in; } else {...
[ "@", "Override", "public", "Insets", "getInsets", "(", "SynthContext", "ctx", ",", "Insets", "in", ")", "{", "if", "(", "in", "==", "null", ")", "{", "in", "=", "new", "Insets", "(", "0", ",", "0", ",", "0", ",", "0", ")", ";", "}", "Values", "...
Returns the Insets that are used to calculate sizing information. <p>Overridden to cause this style to populate itself with data from UIDefaults, if necessary.</p> @param ctx context SynthContext identifying requester @param in insets Insets to place return value in. @return Sizing Insets.
[ "Returns", "the", "Insets", "that", "are", "used", "to", "calculate", "sizing", "information", "." ]
f25ecba622923d7b29b64cb7d6068dd8005989b3
https://github.com/khuxtable/seaglass/blob/f25ecba622923d7b29b64cb7d6068dd8005989b3/src/main/java/com/seaglasslookandfeel/SeaGlassStyle.java#L776-L818
771
khuxtable/seaglass
src/main/java/com/seaglasslookandfeel/SeaGlassStyle.java
SeaGlassStyle.isOpaque
@Override public boolean isOpaque(SynthContext ctx) { // Force Table CellRenderers to be opaque if ("Table.cellRenderer".equals(ctx.getComponent().getName())) { return true; } Boolean opaque = (Boolean) get(ctx, "opaque"); return opaque == null ? false : opaque;...
java
@Override public boolean isOpaque(SynthContext ctx) { // Force Table CellRenderers to be opaque if ("Table.cellRenderer".equals(ctx.getComponent().getName())) { return true; } Boolean opaque = (Boolean) get(ctx, "opaque"); return opaque == null ? false : opaque;...
[ "@", "Override", "public", "boolean", "isOpaque", "(", "SynthContext", "ctx", ")", "{", "// Force Table CellRenderers to be opaque", "if", "(", "\"Table.cellRenderer\"", ".", "equals", "(", "ctx", ".", "getComponent", "(", ")", ".", "getName", "(", ")", ")", ")"...
Returns true if the region is opaque. <p>Overridden to cause this style to populate itself with data from UIDefaults, if necessary. If opacity is not specified in UI defaults, then it defaults to being non-opaque.</p> @param ctx context SynthContext identifying requester @return true if region is opaque.
[ "Returns", "true", "if", "the", "region", "is", "opaque", "." ]
f25ecba622923d7b29b64cb7d6068dd8005989b3
https://github.com/khuxtable/seaglass/blob/f25ecba622923d7b29b64cb7d6068dd8005989b3/src/main/java/com/seaglasslookandfeel/SeaGlassStyle.java#L940-L950
772
khuxtable/seaglass
src/main/java/com/seaglasslookandfeel/SeaGlassStyle.java
SeaGlassStyle.get
@Override public Object get(SynthContext ctx, Object key) { Values v = getValues(ctx); // strip off the prefix, if there is one. String fullKey = key.toString(); String partialKey = fullKey.substring(fullKey.indexOf(".") + 1); Object obj = null; int xstate ...
java
@Override public Object get(SynthContext ctx, Object key) { Values v = getValues(ctx); // strip off the prefix, if there is one. String fullKey = key.toString(); String partialKey = fullKey.substring(fullKey.indexOf(".") + 1); Object obj = null; int xstate ...
[ "@", "Override", "public", "Object", "get", "(", "SynthContext", "ctx", ",", "Object", "key", ")", "{", "Values", "v", "=", "getValues", "(", "ctx", ")", ";", "// strip off the prefix, if there is one.", "String", "fullKey", "=", "key", ".", "toString", "(", ...
Getter for a region specific style property. <p>Overridden to cause this style to populate itself with data from UIDefaults, if necessary.</p> <p>Properties in UIDefaults may be specified in a chained manner. For example:</p> <pre> background Button.opacity Button.Enabled.foreground Button.Enabled+Selected.backgroun...
[ "Getter", "for", "a", "region", "specific", "style", "property", "." ]
f25ecba622923d7b29b64cb7d6068dd8005989b3
https://github.com/khuxtable/seaglass/blob/f25ecba622923d7b29b64cb7d6068dd8005989b3/src/main/java/com/seaglasslookandfeel/SeaGlassStyle.java#L988-L1035
773
khuxtable/seaglass
src/main/java/com/seaglasslookandfeel/painter/ComboBoxArrowButtonPainter.java
ComboBoxArrowButtonPainter.paintButton
private void paintButton(Graphics2D g, JComponent c, int width, int height) { g.setRenderingHint(RenderingHints.KEY_ANTIALIASING, RenderingHints.VALUE_ANTIALIAS_ON); Shape s = createButtonPath(CornerSize.BORDER, 0, 2, width - 2, height - 4); g.setPaint(getComboBoxButtonBorderPaint(s, type)); ...
java
private void paintButton(Graphics2D g, JComponent c, int width, int height) { g.setRenderingHint(RenderingHints.KEY_ANTIALIASING, RenderingHints.VALUE_ANTIALIAS_ON); Shape s = createButtonPath(CornerSize.BORDER, 0, 2, width - 2, height - 4); g.setPaint(getComboBoxButtonBorderPaint(s, type)); ...
[ "private", "void", "paintButton", "(", "Graphics2D", "g", ",", "JComponent", "c", ",", "int", "width", ",", "int", "height", ")", "{", "g", ".", "setRenderingHint", "(", "RenderingHints", ".", "KEY_ANTIALIASING", ",", "RenderingHints", ".", "VALUE_ANTIALIAS_ON",...
Paint the button shape. @param g the Graphics2D context to paint with. @param c the component to paint. @param width the width. @param height the height.
[ "Paint", "the", "button", "shape", "." ]
f25ecba622923d7b29b64cb7d6068dd8005989b3
https://github.com/khuxtable/seaglass/blob/f25ecba622923d7b29b64cb7d6068dd8005989b3/src/main/java/com/seaglasslookandfeel/painter/ComboBoxArrowButtonPainter.java#L145-L156
774
khuxtable/seaglass
src/main/java/com/seaglasslookandfeel/util/ImageCache.java
ImageCache.getImage
public Image getImage(GraphicsConfiguration config, int w, int h, Object... args) { lock.readLock().lock(); try { PixelCountSoftReference ref = map.get(hash(config, w, h, args)); // check reference has not been lost and the key truly matches, in // case of false pos...
java
public Image getImage(GraphicsConfiguration config, int w, int h, Object... args) { lock.readLock().lock(); try { PixelCountSoftReference ref = map.get(hash(config, w, h, args)); // check reference has not been lost and the key truly matches, in // case of false pos...
[ "public", "Image", "getImage", "(", "GraphicsConfiguration", "config", ",", "int", "w", ",", "int", "h", ",", "Object", "...", "args", ")", "{", "lock", ".", "readLock", "(", ")", ".", "lock", "(", ")", ";", "try", "{", "PixelCountSoftReference", "ref", ...
Get the cached image for given keys @param config The graphics configuration, needed if cached image is a Volatile Image. Used as part of cache key @param w The image width, used as part of cache key @param h The image height, used as part of cache key @param args Other arguments to use as part of the ...
[ "Get", "the", "cached", "image", "for", "given", "keys" ]
f25ecba622923d7b29b64cb7d6068dd8005989b3
https://github.com/khuxtable/seaglass/blob/f25ecba622923d7b29b64cb7d6068dd8005989b3/src/main/java/com/seaglasslookandfeel/util/ImageCache.java#L133-L149
775
khuxtable/seaglass
src/main/java/com/seaglasslookandfeel/util/ImageCache.java
ImageCache.setImage
public boolean setImage(Image image, GraphicsConfiguration config, int w, int h, Object... args) { if (!isImageCachable(w, h)) return false; int hash = hash(config, w, h, args); lock.writeLock().lock(); try { PixelCountSoftReference ref = map.get(hash); ...
java
public boolean setImage(Image image, GraphicsConfiguration config, int w, int h, Object... args) { if (!isImageCachable(w, h)) return false; int hash = hash(config, w, h, args); lock.writeLock().lock(); try { PixelCountSoftReference ref = map.get(hash); ...
[ "public", "boolean", "setImage", "(", "Image", "image", ",", "GraphicsConfiguration", "config", ",", "int", "w", ",", "int", "h", ",", "Object", "...", "args", ")", "{", "if", "(", "!", "isImageCachable", "(", "w", ",", "h", ")", ")", "return", "false"...
Sets the cached image for the specified constraints. @param image The image to store in cache @param config The graphics configuration, needed if cached image is a Volatile Image. Used as part of cache key @param w The image width, used as part of cache key @param h The image height, used as part of cac...
[ "Sets", "the", "cached", "image", "for", "the", "specified", "constraints", "." ]
f25ecba622923d7b29b64cb7d6068dd8005989b3
https://github.com/khuxtable/seaglass/blob/f25ecba622923d7b29b64cb7d6068dd8005989b3/src/main/java/com/seaglasslookandfeel/util/ImageCache.java#L164-L226
776
khuxtable/seaglass
src/main/java/com/seaglasslookandfeel/util/ImageCache.java
ImageCache.hash
private int hash(GraphicsConfiguration config, int w, int h, Object... args) { int hash; hash = (config != null ? config.hashCode() : 0); hash = 31 * hash + w; hash = 31 * hash + h; hash = 31 * hash + Arrays.deepHashCode(args); return hash; }
java
private int hash(GraphicsConfiguration config, int w, int h, Object... args) { int hash; hash = (config != null ? config.hashCode() : 0); hash = 31 * hash + w; hash = 31 * hash + h; hash = 31 * hash + Arrays.deepHashCode(args); return hash; }
[ "private", "int", "hash", "(", "GraphicsConfiguration", "config", ",", "int", "w", ",", "int", "h", ",", "Object", "...", "args", ")", "{", "int", "hash", ";", "hash", "=", "(", "config", "!=", "null", "?", "config", ".", "hashCode", "(", ")", ":", ...
Create a unique hash from all the input. @param config the graphics configuration. @param w the width. @param h the height. @param args the arguments for the image. @return the hash for the object instance.
[ "Create", "a", "unique", "hash", "from", "all", "the", "input", "." ]
f25ecba622923d7b29b64cb7d6068dd8005989b3
https://github.com/khuxtable/seaglass/blob/f25ecba622923d7b29b64cb7d6068dd8005989b3/src/main/java/com/seaglasslookandfeel/util/ImageCache.java#L238-L247
777
khuxtable/seaglass
src/main/java/com/seaglasslookandfeel/component/SeaGlassSplitPaneDivider.java
SeaGlassSplitPaneDivider.mapDirection
private int mapDirection(boolean isLeft) { if (isLeft) { if (splitPane.getOrientation() == JSplitPane.HORIZONTAL_SPLIT) { return SwingConstants.WEST; } return SwingConstants.NORTH; } if (splitPane.getOrientation() == JSplitPane.HORIZONTAL_SP...
java
private int mapDirection(boolean isLeft) { if (isLeft) { if (splitPane.getOrientation() == JSplitPane.HORIZONTAL_SPLIT) { return SwingConstants.WEST; } return SwingConstants.NORTH; } if (splitPane.getOrientation() == JSplitPane.HORIZONTAL_SP...
[ "private", "int", "mapDirection", "(", "boolean", "isLeft", ")", "{", "if", "(", "isLeft", ")", "{", "if", "(", "splitPane", ".", "getOrientation", "(", ")", "==", "JSplitPane", ".", "HORIZONTAL_SPLIT", ")", "{", "return", "SwingConstants", ".", "WEST", ";...
Convert the orientation of the pane into compass points based on the pane orientation and the left-right orientation of the containter. @param isLeft {@code true} if the component's container is laid out left-to-right, otherwise {@code false}. @return the compass direction for increasing the divider.
[ "Convert", "the", "orientation", "of", "the", "pane", "into", "compass", "points", "based", "on", "the", "pane", "orientation", "and", "the", "left", "-", "right", "orientation", "of", "the", "containter", "." ]
f25ecba622923d7b29b64cb7d6068dd8005989b3
https://github.com/khuxtable/seaglass/blob/f25ecba622923d7b29b64cb7d6068dd8005989b3/src/main/java/com/seaglasslookandfeel/component/SeaGlassSplitPaneDivider.java#L157-L172
778
khuxtable/seaglass
src/main/java/com/seaglasslookandfeel/component/SeaGlassSplitPaneDivider.java
SeaGlassSplitPaneDivider.createRightOneTouchButton
protected JButton createRightOneTouchButton() { SeaGlassArrowButton b = new SeaGlassArrowButton(SwingConstants.NORTH); int oneTouchSize = lookupOneTouchSize(); b.setName("SplitPaneDivider.rightOneTouchButton"); b.setMinimumSize(new Dimension(oneTouchSize, oneT...
java
protected JButton createRightOneTouchButton() { SeaGlassArrowButton b = new SeaGlassArrowButton(SwingConstants.NORTH); int oneTouchSize = lookupOneTouchSize(); b.setName("SplitPaneDivider.rightOneTouchButton"); b.setMinimumSize(new Dimension(oneTouchSize, oneT...
[ "protected", "JButton", "createRightOneTouchButton", "(", ")", "{", "SeaGlassArrowButton", "b", "=", "new", "SeaGlassArrowButton", "(", "SwingConstants", ".", "NORTH", ")", ";", "int", "oneTouchSize", "=", "lookupOneTouchSize", "(", ")", ";", "b", ".", "setName", ...
Creates and return an instance of JButton that can be used to collapse the right component in the split pane. @return a one-touch button
[ "Creates", "and", "return", "an", "instance", "of", "JButton", "that", "can", "be", "used", "to", "collapse", "the", "right", "component", "in", "the", "split", "pane", "." ]
f25ecba622923d7b29b64cb7d6068dd8005989b3
https://github.com/khuxtable/seaglass/blob/f25ecba622923d7b29b64cb7d6068dd8005989b3/src/main/java/com/seaglasslookandfeel/component/SeaGlassSplitPaneDivider.java#L213-L230
779
khuxtable/seaglass
src/main/java/com/seaglasslookandfeel/effect/EffectUtils.java
EffectUtils.clearImage
static void clearImage(BufferedImage img) { Graphics2D g2 = img.createGraphics(); g2.setComposite(AlphaComposite.Clear); g2.fillRect(0, 0, img.getWidth(), img.getHeight()); g2.dispose(); }
java
static void clearImage(BufferedImage img) { Graphics2D g2 = img.createGraphics(); g2.setComposite(AlphaComposite.Clear); g2.fillRect(0, 0, img.getWidth(), img.getHeight()); g2.dispose(); }
[ "static", "void", "clearImage", "(", "BufferedImage", "img", ")", "{", "Graphics2D", "g2", "=", "img", ".", "createGraphics", "(", ")", ";", "g2", ".", "setComposite", "(", "AlphaComposite", ".", "Clear", ")", ";", "g2", ".", "fillRect", "(", "0", ",", ...
Clear a transparent image to 100% transparent @param img The image to clear
[ "Clear", "a", "transparent", "image", "to", "100%", "transparent" ]
f25ecba622923d7b29b64cb7d6068dd8005989b3
https://github.com/khuxtable/seaglass/blob/f25ecba622923d7b29b64cb7d6068dd8005989b3/src/main/java/com/seaglasslookandfeel/effect/EffectUtils.java#L45-L51
780
khuxtable/seaglass
src/main/java/com/seaglasslookandfeel/effect/EffectUtils.java
EffectUtils.gaussianBlur
static BufferedImage gaussianBlur(BufferedImage src, BufferedImage dst, int radius) { int width = src.getWidth(); int height = src.getHeight(); if (dst == null || dst.getWidth() != width || dst.getHeight() != height || src.getType() != dst.getType()) { dst = createColorModelCompati...
java
static BufferedImage gaussianBlur(BufferedImage src, BufferedImage dst, int radius) { int width = src.getWidth(); int height = src.getHeight(); if (dst == null || dst.getWidth() != width || dst.getHeight() != height || src.getType() != dst.getType()) { dst = createColorModelCompati...
[ "static", "BufferedImage", "gaussianBlur", "(", "BufferedImage", "src", ",", "BufferedImage", "dst", ",", "int", "radius", ")", "{", "int", "width", "=", "src", ".", "getWidth", "(", ")", ";", "int", "height", "=", "src", ".", "getHeight", "(", ")", ";",...
Apply Gaussian Blur to Image @param src The image tp @param dst The destination image to draw blured src image into, null if you want a new one created @param radius The blur kernel radius @return The blured image
[ "Apply", "Gaussian", "Blur", "to", "Image" ]
f25ecba622923d7b29b64cb7d6068dd8005989b3
https://github.com/khuxtable/seaglass/blob/f25ecba622923d7b29b64cb7d6068dd8005989b3/src/main/java/com/seaglasslookandfeel/effect/EffectUtils.java#L66-L112
781
khuxtable/seaglass
src/main/java/com/seaglasslookandfeel/effect/EffectUtils.java
EffectUtils.createGaussianKernel
protected static float[] createGaussianKernel(int radius) { if (radius < 1) { throw new IllegalArgumentException("Radius must be >= 1"); } float[] data = new float[radius * 2 + 1]; float sigma = radius / 3.0f; float twoSigmaSquare = 2.0f * sigma * sigma; ...
java
protected static float[] createGaussianKernel(int radius) { if (radius < 1) { throw new IllegalArgumentException("Radius must be >= 1"); } float[] data = new float[radius * 2 + 1]; float sigma = radius / 3.0f; float twoSigmaSquare = 2.0f * sigma * sigma; ...
[ "protected", "static", "float", "[", "]", "createGaussianKernel", "(", "int", "radius", ")", "{", "if", "(", "radius", "<", "1", ")", "{", "throw", "new", "IllegalArgumentException", "(", "\"Radius must be >= 1\"", ")", ";", "}", "float", "[", "]", "data", ...
Create a Gaussian kernel for the transformation. @param radius the kernel radius. @return the Gaussian kernel.
[ "Create", "a", "Gaussian", "kernel", "for", "the", "transformation", "." ]
f25ecba622923d7b29b64cb7d6068dd8005989b3
https://github.com/khuxtable/seaglass/blob/f25ecba622923d7b29b64cb7d6068dd8005989b3/src/main/java/com/seaglasslookandfeel/effect/EffectUtils.java#L234-L259
782
khuxtable/seaglass
src/main/java/com/seaglasslookandfeel/painter/CheckBoxPainter.java
CheckBoxPainter.createCheckMark
private Shape createCheckMark(int x, int y, int size) { int markSize = (int) (size * SIZE_MULTIPLIER + 0.5); int markX = x + (int) (size * X_MULTIPLIER + 0.5); int markY = y + (int) (size * Y_MULTIPLIER + 0.5); return shapeGenerator.createCheckMark(markX, markY, markSize, markSize...
java
private Shape createCheckMark(int x, int y, int size) { int markSize = (int) (size * SIZE_MULTIPLIER + 0.5); int markX = x + (int) (size * X_MULTIPLIER + 0.5); int markY = y + (int) (size * Y_MULTIPLIER + 0.5); return shapeGenerator.createCheckMark(markX, markY, markSize, markSize...
[ "private", "Shape", "createCheckMark", "(", "int", "x", ",", "int", "y", ",", "int", "size", ")", "{", "int", "markSize", "=", "(", "int", ")", "(", "size", "*", "SIZE_MULTIPLIER", "+", "0.5", ")", ";", "int", "markX", "=", "x", "+", "(", "int", ...
Create the check mark shape. @param x the x coordinate of the upper-left corner of the check mark. @param y the y coordinate of the upper-left corner of the check mark. @param size the check mark size in pixels. @return the check mark shape.
[ "Create", "the", "check", "mark", "shape", "." ]
f25ecba622923d7b29b64cb7d6068dd8005989b3
https://github.com/khuxtable/seaglass/blob/f25ecba622923d7b29b64cb7d6068dd8005989b3/src/main/java/com/seaglasslookandfeel/painter/CheckBoxPainter.java#L188-L194
783
khuxtable/seaglass
src/main/java/com/seaglasslookandfeel/painter/CheckBoxPainter.java
CheckBoxPainter.getCheckBoxBulletPaint
public Paint getCheckBoxBulletPaint(Shape s, CommonControlState type) { return createCheckMarkGradient(s, getCheckBoxBulletColors(type)); }
java
public Paint getCheckBoxBulletPaint(Shape s, CommonControlState type) { return createCheckMarkGradient(s, getCheckBoxBulletColors(type)); }
[ "public", "Paint", "getCheckBoxBulletPaint", "(", "Shape", "s", ",", "CommonControlState", "type", ")", "{", "return", "createCheckMarkGradient", "(", "s", ",", "getCheckBoxBulletColors", "(", "type", ")", ")", ";", "}" ]
Create the paint for the check mark. @param s the check mark shape. Used for bounds. @param type the color type to create. @return the paint to use for the check mark.
[ "Create", "the", "paint", "for", "the", "check", "mark", "." ]
f25ecba622923d7b29b64cb7d6068dd8005989b3
https://github.com/khuxtable/seaglass/blob/f25ecba622923d7b29b64cb7d6068dd8005989b3/src/main/java/com/seaglasslookandfeel/painter/CheckBoxPainter.java#L204-L206
784
khuxtable/seaglass
src/main/java/com/seaglasslookandfeel/painter/CheckBoxPainter.java
CheckBoxPainter.getCheckBoxBulletColors
private TwoColors getCheckBoxBulletColors(CommonControlState type) { switch (type) { case DISABLED: case DISABLED_SELECTED: return buttonbulletDisabled; case ENABLED: case PRESSED: case SELECTED: case PRESSED_SELECTED: return buttonBullet...
java
private TwoColors getCheckBoxBulletColors(CommonControlState type) { switch (type) { case DISABLED: case DISABLED_SELECTED: return buttonbulletDisabled; case ENABLED: case PRESSED: case SELECTED: case PRESSED_SELECTED: return buttonBullet...
[ "private", "TwoColors", "getCheckBoxBulletColors", "(", "CommonControlState", "type", ")", "{", "switch", "(", "type", ")", "{", "case", "DISABLED", ":", "case", "DISABLED_SELECTED", ":", "return", "buttonbulletDisabled", ";", "case", "ENABLED", ":", "case", "PRES...
Get the colors to use for the check mark. @param type the state. @return the color set.
[ "Get", "the", "colors", "to", "use", "for", "the", "check", "mark", "." ]
f25ecba622923d7b29b64cb7d6068dd8005989b3
https://github.com/khuxtable/seaglass/blob/f25ecba622923d7b29b64cb7d6068dd8005989b3/src/main/java/com/seaglasslookandfeel/painter/CheckBoxPainter.java#L215-L230
785
khuxtable/seaglass
src/main/java/com/seaglasslookandfeel/component/SeaGlassInternalFrameTitlePane.java
SeaGlassInternalFrameTitlePane.getComponentState
private int getComponentState(JComponent c) { if (frame != null) { if (frame.isSelected()) { return SELECTED; } } return SeaGlassLookAndFeel.getComponentState(c); }
java
private int getComponentState(JComponent c) { if (frame != null) { if (frame.isSelected()) { return SELECTED; } } return SeaGlassLookAndFeel.getComponentState(c); }
[ "private", "int", "getComponentState", "(", "JComponent", "c", ")", "{", "if", "(", "frame", "!=", "null", ")", "{", "if", "(", "frame", ".", "isSelected", "(", ")", ")", "{", "return", "SELECTED", ";", "}", "}", "return", "SeaGlassLookAndFeel", ".", "...
Get the state for the component. @param c the component. @return the state for the component.
[ "Get", "the", "state", "for", "the", "component", "." ]
f25ecba622923d7b29b64cb7d6068dd8005989b3
https://github.com/khuxtable/seaglass/blob/f25ecba622923d7b29b64cb7d6068dd8005989b3/src/main/java/com/seaglasslookandfeel/component/SeaGlassInternalFrameTitlePane.java#L154-L163
786
khuxtable/seaglass
src/main/java/com/seaglasslookandfeel/component/SeaGlassInternalFrameTitlePane.java
SeaGlassInternalFrameTitlePane.installTitlePane
private void installTitlePane() { installDefaults(); installListeners(); createActions(); enableActions(); createActionMap(); setLayout(createLayout()); assembleSystemMenu(); createButtons(); addSubComponents(); }
java
private void installTitlePane() { installDefaults(); installListeners(); createActions(); enableActions(); createActionMap(); setLayout(createLayout()); assembleSystemMenu(); createButtons(); addSubComponents(); }
[ "private", "void", "installTitlePane", "(", ")", "{", "installDefaults", "(", ")", ";", "installListeners", "(", ")", ";", "createActions", "(", ")", ";", "enableActions", "(", ")", ";", "createActionMap", "(", ")", ";", "setLayout", "(", "createLayout", "("...
Install the UI and listeners for the title pane.
[ "Install", "the", "UI", "and", "listeners", "for", "the", "title", "pane", "." ]
f25ecba622923d7b29b64cb7d6068dd8005989b3
https://github.com/khuxtable/seaglass/blob/f25ecba622923d7b29b64cb7d6068dd8005989b3/src/main/java/com/seaglasslookandfeel/component/SeaGlassInternalFrameTitlePane.java#L168-L181
787
khuxtable/seaglass
src/main/java/com/seaglasslookandfeel/component/SeaGlassInternalFrameTitlePane.java
SeaGlassInternalFrameTitlePane.addSubComponents
private void addSubComponents() { menuButton.setName("InternalFrameTitlePane.menuButton"); iconButton.setName("InternalFrameTitlePane.iconifyButton"); maxButton.setName("InternalFrameTitlePane.maximizeButton"); closeButton.setName("InternalFrameTitlePane.closeButton"); add(menuB...
java
private void addSubComponents() { menuButton.setName("InternalFrameTitlePane.menuButton"); iconButton.setName("InternalFrameTitlePane.iconifyButton"); maxButton.setName("InternalFrameTitlePane.maximizeButton"); closeButton.setName("InternalFrameTitlePane.closeButton"); add(menuB...
[ "private", "void", "addSubComponents", "(", ")", "{", "menuButton", ".", "setName", "(", "\"InternalFrameTitlePane.menuButton\"", ")", ";", "iconButton", ".", "setName", "(", "\"InternalFrameTitlePane.iconifyButton\"", ")", ";", "maxButton", ".", "setName", "(", "\"In...
Add the button subcomponents to the title pane.
[ "Add", "the", "button", "subcomponents", "to", "the", "title", "pane", "." ]
f25ecba622923d7b29b64cb7d6068dd8005989b3
https://github.com/khuxtable/seaglass/blob/f25ecba622923d7b29b64cb7d6068dd8005989b3/src/main/java/com/seaglasslookandfeel/component/SeaGlassInternalFrameTitlePane.java#L186-L196
788
khuxtable/seaglass
src/main/java/com/seaglasslookandfeel/component/SeaGlassInternalFrameTitlePane.java
SeaGlassInternalFrameTitlePane.createActions
private void createActions() { maximizeAction = new MaximizeAction(); iconifyAction = new IconifyAction(); closeAction = new CloseAction(); restoreAction = new RestoreAction(); moveAction = new MoveAction(); sizeAction = new SizeAction(); }
java
private void createActions() { maximizeAction = new MaximizeAction(); iconifyAction = new IconifyAction(); closeAction = new CloseAction(); restoreAction = new RestoreAction(); moveAction = new MoveAction(); sizeAction = new SizeAction(); }
[ "private", "void", "createActions", "(", ")", "{", "maximizeAction", "=", "new", "MaximizeAction", "(", ")", ";", "iconifyAction", "=", "new", "IconifyAction", "(", ")", ";", "closeAction", "=", "new", "CloseAction", "(", ")", ";", "restoreAction", "=", "new...
Create the actions for the buttons.
[ "Create", "the", "actions", "for", "the", "buttons", "." ]
f25ecba622923d7b29b64cb7d6068dd8005989b3
https://github.com/khuxtable/seaglass/blob/f25ecba622923d7b29b64cb7d6068dd8005989b3/src/main/java/com/seaglasslookandfeel/component/SeaGlassInternalFrameTitlePane.java#L201-L208
789
khuxtable/seaglass
src/main/java/com/seaglasslookandfeel/component/SeaGlassInternalFrameTitlePane.java
SeaGlassInternalFrameTitlePane.createActionMap
ActionMap createActionMap() { ActionMap map = new ActionMapUIResource(); map.put("showSystemMenu", new ShowSystemMenuAction(true)); map.put("hideSystemMenu", new ShowSystemMenuAction(false)); return map; }
java
ActionMap createActionMap() { ActionMap map = new ActionMapUIResource(); map.put("showSystemMenu", new ShowSystemMenuAction(true)); map.put("hideSystemMenu", new ShowSystemMenuAction(false)); return map; }
[ "ActionMap", "createActionMap", "(", ")", "{", "ActionMap", "map", "=", "new", "ActionMapUIResource", "(", ")", ";", "map", ".", "put", "(", "\"showSystemMenu\"", ",", "new", "ShowSystemMenuAction", "(", "true", ")", ")", ";", "map", ".", "put", "(", "\"hi...
Create the action map for the system menu. @return the action map.
[ "Create", "the", "action", "map", "for", "the", "system", "menu", "." ]
f25ecba622923d7b29b64cb7d6068dd8005989b3
https://github.com/khuxtable/seaglass/blob/f25ecba622923d7b29b64cb7d6068dd8005989b3/src/main/java/com/seaglasslookandfeel/component/SeaGlassInternalFrameTitlePane.java#L215-L222
790
khuxtable/seaglass
src/main/java/com/seaglasslookandfeel/component/SeaGlassInternalFrameTitlePane.java
SeaGlassInternalFrameTitlePane.uninstallDefaults
public void uninstallDefaults() { SeaGlassContext context = getContext(this, ENABLED); style.uninstallDefaults(context); context.dispose(); style = null; JInternalFrame.JDesktopIcon di = frame.getDesktopIcon(); if (di != null && di.getComponentPopupMenu() == systemPopup...
java
public void uninstallDefaults() { SeaGlassContext context = getContext(this, ENABLED); style.uninstallDefaults(context); context.dispose(); style = null; JInternalFrame.JDesktopIcon di = frame.getDesktopIcon(); if (di != null && di.getComponentPopupMenu() == systemPopup...
[ "public", "void", "uninstallDefaults", "(", ")", "{", "SeaGlassContext", "context", "=", "getContext", "(", "this", ",", "ENABLED", ")", ";", "style", ".", "uninstallDefaults", "(", "context", ")", ";", "context", ".", "dispose", "(", ")", ";", "style", "=...
Uninstall the defaults.
[ "Uninstall", "the", "defaults", "." ]
f25ecba622923d7b29b64cb7d6068dd8005989b3
https://github.com/khuxtable/seaglass/blob/f25ecba622923d7b29b64cb7d6068dd8005989b3/src/main/java/com/seaglasslookandfeel/component/SeaGlassInternalFrameTitlePane.java#L258-L271
791
khuxtable/seaglass
src/main/java/com/seaglasslookandfeel/component/SeaGlassInternalFrameTitlePane.java
SeaGlassInternalFrameTitlePane.createButtons
private void createButtons() { iconButton = new NoFocusButton("InternalFrameTitlePane.iconifyButtonAccessibleName"); iconButton.addActionListener(iconifyAction); if (iconButtonToolTip != null && iconButtonToolTip.length() != 0) { iconButton.setToolTipText(iconButtonToolTip); ...
java
private void createButtons() { iconButton = new NoFocusButton("InternalFrameTitlePane.iconifyButtonAccessibleName"); iconButton.addActionListener(iconifyAction); if (iconButtonToolTip != null && iconButtonToolTip.length() != 0) { iconButton.setToolTipText(iconButtonToolTip); ...
[ "private", "void", "createButtons", "(", ")", "{", "iconButton", "=", "new", "NoFocusButton", "(", "\"InternalFrameTitlePane.iconifyButtonAccessibleName\"", ")", ";", "iconButton", ".", "addActionListener", "(", "iconifyAction", ")", ";", "if", "(", "iconButtonToolTip",...
Create the buttons and add action listeners.
[ "Create", "the", "buttons", "and", "add", "action", "listeners", "." ]
f25ecba622923d7b29b64cb7d6068dd8005989b3
https://github.com/khuxtable/seaglass/blob/f25ecba622923d7b29b64cb7d6068dd8005989b3/src/main/java/com/seaglasslookandfeel/component/SeaGlassInternalFrameTitlePane.java#L294-L313
792
khuxtable/seaglass
src/main/java/com/seaglasslookandfeel/component/SeaGlassInternalFrameTitlePane.java
SeaGlassInternalFrameTitlePane.setButtonTooltips
private void setButtonTooltips() { if (frame.isIcon()) { if (restoreButtonToolTip != null && restoreButtonToolTip.length() != 0) { iconButton.setToolTipText(restoreButtonToolTip); } if (maxButtonToolTip != null && maxButtonToolTip.length() != 0) { ...
java
private void setButtonTooltips() { if (frame.isIcon()) { if (restoreButtonToolTip != null && restoreButtonToolTip.length() != 0) { iconButton.setToolTipText(restoreButtonToolTip); } if (maxButtonToolTip != null && maxButtonToolTip.length() != 0) { ...
[ "private", "void", "setButtonTooltips", "(", ")", "{", "if", "(", "frame", ".", "isIcon", "(", ")", ")", "{", "if", "(", "restoreButtonToolTip", "!=", "null", "&&", "restoreButtonToolTip", ".", "length", "(", ")", "!=", "0", ")", "{", "iconButton", ".", ...
Set the buttons' tooltip text.
[ "Set", "the", "buttons", "tooltip", "text", "." ]
f25ecba622923d7b29b64cb7d6068dd8005989b3
https://github.com/khuxtable/seaglass/blob/f25ecba622923d7b29b64cb7d6068dd8005989b3/src/main/java/com/seaglasslookandfeel/component/SeaGlassInternalFrameTitlePane.java#L318-L347
793
khuxtable/seaglass
src/main/java/com/seaglasslookandfeel/component/SeaGlassInternalFrameTitlePane.java
SeaGlassInternalFrameTitlePane.assembleSystemMenu
private void assembleSystemMenu() { systemPopupMenu = new JPopupMenuUIResource(); addSystemMenuItems(systemPopupMenu); enableActions(); menuButton = new NoFocusButton("InternalFrameTitlePane.menuButtonAccessibleName"); updateMenuIcon(); menuButton.addMouseListener(new Mou...
java
private void assembleSystemMenu() { systemPopupMenu = new JPopupMenuUIResource(); addSystemMenuItems(systemPopupMenu); enableActions(); menuButton = new NoFocusButton("InternalFrameTitlePane.menuButtonAccessibleName"); updateMenuIcon(); menuButton.addMouseListener(new Mou...
[ "private", "void", "assembleSystemMenu", "(", ")", "{", "systemPopupMenu", "=", "new", "JPopupMenuUIResource", "(", ")", ";", "addSystemMenuItems", "(", "systemPopupMenu", ")", ";", "enableActions", "(", ")", ";", "menuButton", "=", "new", "NoFocusButton", "(", ...
Create the system menu.
[ "Create", "the", "system", "menu", "." ]
f25ecba622923d7b29b64cb7d6068dd8005989b3
https://github.com/khuxtable/seaglass/blob/f25ecba622923d7b29b64cb7d6068dd8005989b3/src/main/java/com/seaglasslookandfeel/component/SeaGlassInternalFrameTitlePane.java#L352-L384
794
khuxtable/seaglass
src/main/java/com/seaglasslookandfeel/component/SeaGlassInternalFrameTitlePane.java
SeaGlassInternalFrameTitlePane.addSystemMenuItems
private void addSystemMenuItems(JPopupMenu menu) { // PENDING: this should all be localizable! JMenuItem mi = (JMenuItem) menu.add(restoreAction); mi.setMnemonic('R'); mi = (JMenuItem) menu.add(moveAction); mi.setMnemonic('M'); mi = (JMenuItem) menu.add(sizeAction); ...
java
private void addSystemMenuItems(JPopupMenu menu) { // PENDING: this should all be localizable! JMenuItem mi = (JMenuItem) menu.add(restoreAction); mi.setMnemonic('R'); mi = (JMenuItem) menu.add(moveAction); mi.setMnemonic('M'); mi = (JMenuItem) menu.add(sizeAction); ...
[ "private", "void", "addSystemMenuItems", "(", "JPopupMenu", "menu", ")", "{", "// PENDING: this should all be localizable!", "JMenuItem", "mi", "=", "(", "JMenuItem", ")", "menu", ".", "add", "(", "restoreAction", ")", ";", "mi", ".", "setMnemonic", "(", "'", "'...
Add the items to the system menu. @param menu the system menu popup.
[ "Add", "the", "items", "to", "the", "system", "menu", "." ]
f25ecba622923d7b29b64cb7d6068dd8005989b3
https://github.com/khuxtable/seaglass/blob/f25ecba622923d7b29b64cb7d6068dd8005989b3/src/main/java/com/seaglasslookandfeel/component/SeaGlassInternalFrameTitlePane.java#L391-L407
795
khuxtable/seaglass
src/main/java/com/seaglasslookandfeel/component/SeaGlassInternalFrameTitlePane.java
SeaGlassInternalFrameTitlePane.createLayout
private LayoutManager createLayout() { SeaGlassContext context = getContext(this); LayoutManager lm = (LayoutManager) style.get(context, "InternalFrameTitlePane.titlePaneLayout"); context.dispose(); return (lm != null) ? lm : new SeaGlassTitlePaneLayout(); }
java
private LayoutManager createLayout() { SeaGlassContext context = getContext(this); LayoutManager lm = (LayoutManager) style.get(context, "InternalFrameTitlePane.titlePaneLayout"); context.dispose(); return (lm != null) ? lm : new SeaGlassTitlePaneLayout(); }
[ "private", "LayoutManager", "createLayout", "(", ")", "{", "SeaGlassContext", "context", "=", "getContext", "(", "this", ")", ";", "LayoutManager", "lm", "=", "(", "LayoutManager", ")", "style", ".", "get", "(", "context", ",", "\"InternalFrameTitlePane.titlePaneL...
Create the layout manager for the title pane. @return the layout manager.
[ "Create", "the", "layout", "manager", "for", "the", "title", "pane", "." ]
f25ecba622923d7b29b64cb7d6068dd8005989b3
https://github.com/khuxtable/seaglass/blob/f25ecba622923d7b29b64cb7d6068dd8005989b3/src/main/java/com/seaglasslookandfeel/component/SeaGlassInternalFrameTitlePane.java#L541-L548
796
khuxtable/seaglass
src/main/java/com/seaglasslookandfeel/component/SeaGlassInternalFrameTitlePane.java
SeaGlassInternalFrameTitlePane.postClosingEvent
protected void postClosingEvent(JInternalFrame frame) { InternalFrameEvent e = new InternalFrameEvent(frame, InternalFrameEvent.INTERNAL_FRAME_CLOSING); // Try posting event, unless there's a SecurityManager. if (JInternalFrame.class.getClassLoader() == null) { try { ...
java
protected void postClosingEvent(JInternalFrame frame) { InternalFrameEvent e = new InternalFrameEvent(frame, InternalFrameEvent.INTERNAL_FRAME_CLOSING); // Try posting event, unless there's a SecurityManager. if (JInternalFrame.class.getClassLoader() == null) { try { ...
[ "protected", "void", "postClosingEvent", "(", "JInternalFrame", "frame", ")", "{", "InternalFrameEvent", "e", "=", "new", "InternalFrameEvent", "(", "frame", ",", "InternalFrameEvent", ".", "INTERNAL_FRAME_CLOSING", ")", ";", "// Try posting event, unless there's a Security...
Post a WINDOW_CLOSING-like event to the frame, so that it can be treated like a regular Frame. @param frame the internal frame to be closed.
[ "Post", "a", "WINDOW_CLOSING", "-", "like", "event", "to", "the", "frame", "so", "that", "it", "can", "be", "treated", "like", "a", "regular", "Frame", "." ]
f25ecba622923d7b29b64cb7d6068dd8005989b3
https://github.com/khuxtable/seaglass/blob/f25ecba622923d7b29b64cb7d6068dd8005989b3/src/main/java/com/seaglasslookandfeel/component/SeaGlassInternalFrameTitlePane.java#L644-L660
797
khuxtable/seaglass
src/main/java/com/seaglasslookandfeel/effect/Effect.java
Effect.fill
public void fill(Graphics2D g, Shape s) { Rectangle bounds = s.getBounds(); int width = bounds.width; int height = bounds.height; BufferedImage bimage = Effect.createBufferedImage(width, height, true); Graphics2D gbi = bimage.createGraphics(); gbi.set...
java
public void fill(Graphics2D g, Shape s) { Rectangle bounds = s.getBounds(); int width = bounds.width; int height = bounds.height; BufferedImage bimage = Effect.createBufferedImage(width, height, true); Graphics2D gbi = bimage.createGraphics(); gbi.set...
[ "public", "void", "fill", "(", "Graphics2D", "g", ",", "Shape", "s", ")", "{", "Rectangle", "bounds", "=", "s", ".", "getBounds", "(", ")", ";", "int", "width", "=", "bounds", ".", "width", ";", "int", "height", "=", "bounds", ".", "height", ";", "...
Paint the effect based around a solid shape in the graphics supplied. @param g the graphics to paint into. @param s the shape to base the effect around.
[ "Paint", "the", "effect", "based", "around", "a", "solid", "shape", "in", "the", "graphics", "supplied", "." ]
f25ecba622923d7b29b64cb7d6068dd8005989b3
https://github.com/khuxtable/seaglass/blob/f25ecba622923d7b29b64cb7d6068dd8005989b3/src/main/java/com/seaglasslookandfeel/effect/Effect.java#L104-L116
798
khuxtable/seaglass
src/main/java/com/seaglasslookandfeel/effect/Effect.java
Effect.createBufferedImage
protected static BufferedImage createBufferedImage(int width, int height, boolean hasAlpha) { BufferedImage bimage = null; GraphicsEnvironment ge = GraphicsEnvironment.getLocalGraphicsEnvironment(); try { // Determine the type of transparency of the new buffered image ...
java
protected static BufferedImage createBufferedImage(int width, int height, boolean hasAlpha) { BufferedImage bimage = null; GraphicsEnvironment ge = GraphicsEnvironment.getLocalGraphicsEnvironment(); try { // Determine the type of transparency of the new buffered image ...
[ "protected", "static", "BufferedImage", "createBufferedImage", "(", "int", "width", ",", "int", "height", ",", "boolean", "hasAlpha", ")", "{", "BufferedImage", "bimage", "=", "null", ";", "GraphicsEnvironment", "ge", "=", "GraphicsEnvironment", ".", "getLocalGraphi...
Create a buffered image of the given width and height, compatible with the alpha requirement. @param width the width of the new buffered image. @param height the height of the new buffered image. @param hasAlpha {@code true} if the new buffered image needs to support alpha transparency, {@code false} otherwise...
[ "Create", "a", "buffered", "image", "of", "the", "given", "width", "and", "height", "compatible", "with", "the", "alpha", "requirement", "." ]
f25ecba622923d7b29b64cb7d6068dd8005989b3
https://github.com/khuxtable/seaglass/blob/f25ecba622923d7b29b64cb7d6068dd8005989b3/src/main/java/com/seaglasslookandfeel/effect/Effect.java#L146-L181
799
khuxtable/seaglass
src/main/java/com/seaglasslookandfeel/effect/Effect.java
Effect.toBufferedImage
protected static BufferedImage toBufferedImage(Image image) { if (image instanceof BufferedImage) { return (BufferedImage) image; } // This code ensures that all the pixels in the image are loaded image = new ImageIcon(image).getImage(); // Determine if the image ha...
java
protected static BufferedImage toBufferedImage(Image image) { if (image instanceof BufferedImage) { return (BufferedImage) image; } // This code ensures that all the pixels in the image are loaded image = new ImageIcon(image).getImage(); // Determine if the image ha...
[ "protected", "static", "BufferedImage", "toBufferedImage", "(", "Image", "image", ")", "{", "if", "(", "image", "instanceof", "BufferedImage", ")", "{", "return", "(", "BufferedImage", ")", "image", ";", "}", "// This code ensures that all the pixels in the image are lo...
This method returns a buffered image with the contents of an image @param image the image to copy into a buffered image. @return the buffered image containing the image.
[ "This", "method", "returns", "a", "buffered", "image", "with", "the", "contents", "of", "an", "image" ]
f25ecba622923d7b29b64cb7d6068dd8005989b3
https://github.com/khuxtable/seaglass/blob/f25ecba622923d7b29b64cb7d6068dd8005989b3/src/main/java/com/seaglasslookandfeel/effect/Effect.java#L190-L246