Author: rwhitcomb Date: Fri Mar 12 22:59:15 2021 New Revision: 1887555 URL: http://svn.apache.org/viewvc?rev=1887555&view=rev Log: PIVOT-1053: Convert the "wtk" code to using new "putStyle", "getStyle", and "copyStyle" methods in Component.
Modified: pivot/trunk/wtk-terra/src/org/apache/pivot/wtk/skin/terra/TerraFileBrowserSkin.java pivot/trunk/wtk-terra/src/org/apache/pivot/wtk/skin/terra/TerraVFSBrowserSkin.java pivot/trunk/wtk/src/org/apache/pivot/wtk/Checkbox.java pivot/trunk/wtk/src/org/apache/pivot/wtk/Component.java pivot/trunk/wtk/src/org/apache/pivot/wtk/MenuButton.java pivot/trunk/wtk/src/org/apache/pivot/wtk/RadioButton.java pivot/trunk/wtk/src/org/apache/pivot/wtk/content/AccordionHeaderDataRenderer.java pivot/trunk/wtk/src/org/apache/pivot/wtk/content/ButtonDataRenderer.java pivot/trunk/wtk/src/org/apache/pivot/wtk/content/CalendarButtonDataRenderer.java pivot/trunk/wtk/src/org/apache/pivot/wtk/content/LinkButtonDataRenderer.java pivot/trunk/wtk/src/org/apache/pivot/wtk/content/ListButtonDataRenderer.java pivot/trunk/wtk/src/org/apache/pivot/wtk/content/ListViewItemEditor.java pivot/trunk/wtk/src/org/apache/pivot/wtk/content/ListViewItemRenderer.java pivot/trunk/wtk/src/org/apache/pivot/wtk/content/MenuBarItemDataRenderer.java pivot/trunk/wtk/src/org/apache/pivot/wtk/content/MenuButtonDataRenderer.java pivot/trunk/wtk/src/org/apache/pivot/wtk/content/MenuItemDataRenderer.java pivot/trunk/wtk/src/org/apache/pivot/wtk/content/SpinnerItemRenderer.java pivot/trunk/wtk/src/org/apache/pivot/wtk/content/TableViewCellRenderer.java pivot/trunk/wtk/src/org/apache/pivot/wtk/content/TableViewCheckboxCellRenderer.java pivot/trunk/wtk/src/org/apache/pivot/wtk/content/TableViewFileSizeCellRenderer.java pivot/trunk/wtk/src/org/apache/pivot/wtk/content/TableViewHeaderDataRenderer.java pivot/trunk/wtk/src/org/apache/pivot/wtk/content/TableViewImageCellRenderer.java pivot/trunk/wtk/src/org/apache/pivot/wtk/content/TableViewNumberCellRenderer.java pivot/trunk/wtk/src/org/apache/pivot/wtk/content/TableViewRowEditor.java pivot/trunk/wtk/src/org/apache/pivot/wtk/content/TableViewTextAreaCellRenderer.java pivot/trunk/wtk/src/org/apache/pivot/wtk/content/TreeViewNodeEditor.java pivot/trunk/wtk/src/org/apache/pivot/wtk/content/TreeViewNodeRenderer.java pivot/trunk/wtk/src/org/apache/pivot/wtk/effects/WatermarkDecorator.java pivot/trunk/wtk/src/org/apache/pivot/wtk/skin/ComponentSkin.java pivot/trunk/wtk/src/org/apache/pivot/wtk/skin/ScrollPaneSkin.java Modified: pivot/trunk/wtk-terra/src/org/apache/pivot/wtk/skin/terra/TerraFileBrowserSkin.java URL: http://svn.apache.org/viewvc/pivot/trunk/wtk-terra/src/org/apache/pivot/wtk/skin/terra/TerraFileBrowserSkin.java?rev=1887555&r1=1887554&r2=1887555&view=diff ============================================================================== --- pivot/trunk/wtk-terra/src/org/apache/pivot/wtk/skin/terra/TerraFileBrowserSkin.java (original) +++ pivot/trunk/wtk-terra/src/org/apache/pivot/wtk/skin/terra/TerraFileBrowserSkin.java Fri Mar 12 22:59:15 2021 @@ -16,7 +16,6 @@ */ package org.apache.pivot.wtk.skin.terra; -import java.awt.Color; import java.io.File; import java.io.FileFilter; import java.io.IOException; @@ -116,13 +115,13 @@ public class TerraFileBrowserSkin extend } public FileRenderer() { - getStyles().put(Style.verticalAlignment, VerticalAlignment.CENTER); + putStyle(Style.verticalAlignment, VerticalAlignment.CENTER); add(imageView); add(label); imageView.setPreferredSize(ICON_WIDTH, ICON_HEIGHT); - imageView.getStyles().put(Style.backgroundColor, null); + imageView.putStyle(Style.backgroundColor, null); } @Override @@ -156,7 +155,7 @@ public class TerraFileBrowserSkin extend */ public static class ListButtonFileRenderer extends FileRenderer implements Button.DataRenderer { public ListButtonFileRenderer() { - getStyles().put(Style.horizontalAlignment, HorizontalAlignment.LEFT); + putStyle(Style.horizontalAlignment, HorizontalAlignment.LEFT); } @Override @@ -167,7 +166,7 @@ public class TerraFileBrowserSkin extend // Update the image view imageView.setImage(getIcon(file)); - imageView.getStyles().put(Style.opacity, button.isEnabled() && !hidden ? 1.0f : 0.5f); + imageView.putStyle(Style.opacity, button.isEnabled() && !hidden ? 1.0f : 0.5f); // Update the label String text = file.getName(); @@ -179,12 +178,12 @@ public class TerraFileBrowserSkin extend Object color = null; if (button.isEnabled() && !hidden) { - color = button.getStyles().get(Style.color); + color = button.getStyle(Style.color); } else { - color = button.getStyles().get(Style.disabledColor); + color = button.getStyle(Style.disabledColor); } - label.getStyles().put(Style.color, color); + label.putStyle(Style.color, color); } } @@ -205,8 +204,8 @@ public class TerraFileBrowserSkin extend */ public static class ListViewFileRenderer extends FileRenderer implements ListView.ItemRenderer { public ListViewFileRenderer() { - getStyles().put(Style.horizontalAlignment, HorizontalAlignment.LEFT); - getStyles().put(Style.padding, new Insets(2, 3, 2, 3)); + putStyle(Style.horizontalAlignment, HorizontalAlignment.LEFT); + putStyle(Style.padding, new Insets(2, 3, 2, 3)); } @Override @@ -214,7 +213,7 @@ public class TerraFileBrowserSkin extend Button.State state, boolean highlighted, boolean disabled) { boolean hidden = false; - label.getStyles().copy(Style.font, listView.getStyles()); + label.copyStyle(Style.font, listView); if (item != null) { File file = (File) item; @@ -222,7 +221,7 @@ public class TerraFileBrowserSkin extend // Update the image view imageView.setImage(getIcon(file)); - imageView.getStyles().put(Style.opacity, + imageView.putStyle(Style.opacity, (listView.isEnabled() && !disabled && !hidden) ? 1.0f : 0.5f); // Update the label @@ -238,18 +237,18 @@ public class TerraFileBrowserSkin extend if (listView.isEnabled() && !disabled && !hidden) { if (selected) { if (listView.isFocused()) { - color = listView.getStyles().get(Style.selectionColor); + color = listView.getStyle(Style.selectionColor); } else { - color = listView.getStyles().get(Style.inactiveSelectionColor); + color = listView.getStyle(Style.inactiveSelectionColor); } } else { - color = listView.getStyles().get(Style.color); + color = listView.getStyle(Style.color); } } else { - color = listView.getStyles().get(Style.disabledColor); + color = listView.getStyle(Style.disabledColor); } - label.getStyles().put(Style.color, color); + label.putStyle(Style.color, color); } @Override @@ -274,8 +273,8 @@ public class TerraFileBrowserSkin extend public static final String LAST_MODIFIED_KEY = "lastModified"; public TableViewFileRenderer() { - getStyles().put(Style.horizontalAlignment, HorizontalAlignment.CENTER); - getStyles().put(Style.padding, new Insets(2)); + putStyle(Style.horizontalAlignment, HorizontalAlignment.CENTER); + putStyle(Style.padding, new Insets(2)); } @Override @@ -293,16 +292,16 @@ public class TerraFileBrowserSkin extend if (columnName.equals(NAME_KEY)) { text = file.getName(); icon = getIcon(file); - getStyles().put(Style.horizontalAlignment, HorizontalAlignment.LEFT); + putStyle(Style.horizontalAlignment, HorizontalAlignment.LEFT); } else if (columnName.equals(SIZE_KEY)) { long length = file.isDirectory() ? -1 : file.length(); text = FileSizeFormat.getInstance().format(length); - getStyles().put(Style.horizontalAlignment, HorizontalAlignment.RIGHT); + putStyle(Style.horizontalAlignment, HorizontalAlignment.RIGHT); } else if (columnName.equals(LAST_MODIFIED_KEY)) { long lastModified = file.lastModified(); Date lastModifiedDate = new Date(lastModified); text = DATE_FORMAT.format(lastModifiedDate); - getStyles().put(Style.horizontalAlignment, HorizontalAlignment.RIGHT); + putStyle(Style.horizontalAlignment, HorizontalAlignment.RIGHT); } else { System.err.println("Unexpected column name in " + getClass().getName() + ": " + columnName); @@ -311,28 +310,28 @@ public class TerraFileBrowserSkin extend label.setText(text); imageView.setImage(icon); - imageView.getStyles().put(Style.opacity, + imageView.putStyle(Style.opacity, (tableView.isEnabled() && !disabled && !hidden) ? 1.0f : 0.5f); } - label.getStyles().copy(Style.font, tableView.getStyles()); + label.copyStyle(Style.font, tableView); - Color color; + Style colorStyle; if (tableView.isEnabled() && !disabled && !hidden) { if (selected) { if (tableView.isFocused()) { - color = tableView.getStyles().getColor(Style.selectionColor); + colorStyle = Style.selectionColor; } else { - color = tableView.getStyles().getColor(Style.inactiveSelectionColor); + colorStyle = Style.inactiveSelectionColor; } } else { - color = tableView.getStyles().getColor(Style.color); + colorStyle = Style.color; } } else { - color = tableView.getStyles().getColor(Style.disabledColor); + colorStyle = Style.disabledColor; } - label.getStyles().put(Style.color, color); + label.putStyle(Style.color, tableView.getStyleColor(colorStyle)); } @Override @@ -380,13 +379,13 @@ public class TerraFileBrowserSkin extend } public DriveRenderer() { - getStyles().put(Style.verticalAlignment, VerticalAlignment.CENTER); + putStyle(Style.verticalAlignment, VerticalAlignment.CENTER); add(imageView); add(label); imageView.setPreferredSize(ICON_WIDTH, ICON_HEIGHT); - imageView.getStyles().put(Style.backgroundColor, null); + imageView.putStyle(Style.backgroundColor, null); } @Override @@ -405,7 +404,7 @@ public class TerraFileBrowserSkin extend public static class ListButtonDriveRenderer extends DriveRenderer implements Button.DataRenderer { public ListButtonDriveRenderer() { - getStyles().put(Style.horizontalAlignment, HorizontalAlignment.LEFT); + putStyle(Style.horizontalAlignment, HorizontalAlignment.LEFT); } @Override @@ -415,7 +414,7 @@ public class TerraFileBrowserSkin extend // Update the image view imageView.setImage(DRIVE_IMAGE); - imageView.getStyles().put(Style.opacity, button.isEnabled() ? 1.0f : 0.5f); + imageView.putStyle(Style.opacity, button.isEnabled() ? 1.0f : 0.5f); // Update the label label.setText(file.toString()); @@ -434,38 +433,38 @@ public class TerraFileBrowserSkin extend public static class ListViewDriveRenderer extends DriveRenderer implements ListView.ItemRenderer { public ListViewDriveRenderer() { - getStyles().put(Style.horizontalAlignment, HorizontalAlignment.LEFT); - getStyles().put(Style.padding, new Insets(2, 3, 2, 3)); + putStyle(Style.horizontalAlignment, HorizontalAlignment.LEFT); + putStyle(Style.padding, new Insets(2, 3, 2, 3)); } @Override public void render(Object item, int index, ListView listView, boolean selected, Button.State state, boolean highlighted, boolean disabled) { - label.getStyles().copy(Style.font, listView.getStyles()); + label.copyStyle(Style.font, listView); Object color = null; if (listView.isEnabled() && !disabled) { if (selected) { if (listView.isFocused()) { - color = listView.getStyles().get(Style.selectionColor); + color = listView.getStyle(Style.selectionColor); } else { - color = listView.getStyles().get(Style.inactiveSelectionColor); + color = listView.getStyle(Style.inactiveSelectionColor); } } else { - color = listView.getStyles().get(Style.color); + color = listView.getStyle(Style.color); } } else { - color = listView.getStyles().get(Style.disabledColor); + color = listView.getStyle(Style.disabledColor); } - label.getStyles().put(Style.color, color); + label.putStyle(Style.color, color); if (item != null) { File file = (File) item; // Update the image view imageView.setImage(DRIVE_IMAGE); - imageView.getStyles().put(Style.opacity, + imageView.putStyle(Style.opacity, (listView.isEnabled() && !disabled) ? 1.0f : 0.5f); // Update the label @@ -977,8 +976,8 @@ public class TerraFileBrowserSkin extend TextArea toolTipTextArea = new TextArea(); toolTipTextArea.setText(text); - toolTipTextArea.getStyles().put(Style.wrapText, true); - toolTipTextArea.getStyles().put(Style.backgroundColor, null); + toolTipTextArea.putStyle(Style.wrapText, true); + toolTipTextArea.putStyle(Style.backgroundColor, null); tooltip.setContent(toolTipTextArea); Modified: pivot/trunk/wtk-terra/src/org/apache/pivot/wtk/skin/terra/TerraVFSBrowserSkin.java URL: http://svn.apache.org/viewvc/pivot/trunk/wtk-terra/src/org/apache/pivot/wtk/skin/terra/TerraVFSBrowserSkin.java?rev=1887555&r1=1887554&r2=1887555&view=diff ============================================================================== --- pivot/trunk/wtk-terra/src/org/apache/pivot/wtk/skin/terra/TerraVFSBrowserSkin.java (original) +++ pivot/trunk/wtk-terra/src/org/apache/pivot/wtk/skin/terra/TerraVFSBrowserSkin.java Fri Mar 12 22:59:15 2021 @@ -16,7 +16,6 @@ */ package org.apache.pivot.wtk.skin.terra; -import java.awt.Color; import java.io.IOException; import java.io.Serializable; import java.text.DateFormat; @@ -122,13 +121,13 @@ public class TerraVFSBrowserSkin extends } public FileRenderer() { - getStyles().put(Style.verticalAlignment, VerticalAlignment.CENTER); + putStyle(Style.verticalAlignment, VerticalAlignment.CENTER); add(imageView); add(label); imageView.setPreferredSize(ICON_WIDTH, ICON_HEIGHT); - imageView.getStyles().put(Style.backgroundColor, null); + imageView.putStyle(Style.backgroundColor, null); } @Override @@ -181,7 +180,7 @@ public class TerraVFSBrowserSkin extends */ public static class ListButtonFileRenderer extends FileRenderer implements Button.DataRenderer { public ListButtonFileRenderer() { - getStyles().put(Style.horizontalAlignment, HorizontalAlignment.LEFT); + putStyle(Style.horizontalAlignment, HorizontalAlignment.LEFT); } @Override @@ -192,7 +191,7 @@ public class TerraVFSBrowserSkin extends // Update the image view imageView.setImage(getIcon(file)); - imageView.getStyles().put(Style.opacity, button.isEnabled() && !hidden ? 1.0f : 0.5f); + imageView.putStyle(Style.opacity, button.isEnabled() && !hidden ? 1.0f : 0.5f); // Update the label String text = file.getName().getBaseName(); @@ -204,12 +203,12 @@ public class TerraVFSBrowserSkin extends Object color = null; if (button.isEnabled() && !hidden) { - color = button.getStyles().get(Style.color); + color = button.getStyle(Style.color); } else { - color = button.getStyles().get(Style.disabledColor); + color = button.getStyle(Style.disabledColor); } - label.getStyles().put(Style.color, color); + label.putStyle(Style.color, color); } } @@ -230,8 +229,8 @@ public class TerraVFSBrowserSkin extends */ public static class ListViewFileRenderer extends FileRenderer implements ListView.ItemRenderer { public ListViewFileRenderer() { - getStyles().put(Style.horizontalAlignment, HorizontalAlignment.LEFT); - getStyles().put(Style.padding, new Insets(2, 3, 2, 3)); + putStyle(Style.horizontalAlignment, HorizontalAlignment.LEFT); + putStyle(Style.padding, new Insets(2, 3, 2, 3)); } @Override @@ -239,7 +238,7 @@ public class TerraVFSBrowserSkin extends Button.State state, boolean highlighted, boolean disabled) { boolean hidden = false; - label.getStyles().copy(Style.font, listView.getStyles()); + label.copyStyle(Style.font, listView); if (item != null) { FileObject file = (FileObject) item; @@ -247,7 +246,7 @@ public class TerraVFSBrowserSkin extends // Update the image view imageView.setImage(getIcon(file)); - imageView.getStyles().put(Style.opacity, + imageView.putStyle(Style.opacity, (listView.isEnabled() && !disabled && !hidden) ? 1.0f : 0.5f); // Update the label @@ -263,18 +262,18 @@ public class TerraVFSBrowserSkin extends if (listView.isEnabled() && !disabled && !hidden) { if (selected) { if (listView.isFocused()) { - color = listView.getStyles().get(Style.selectionColor); + color = listView.getStyle(Style.selectionColor); } else { - color = listView.getStyles().get(Style.inactiveSelectionColor); + color = listView.getStyle(Style.inactiveSelectionColor); } } else { - color = listView.getStyles().get(Style.color); + color = listView.getStyle(Style.color); } } else { - color = listView.getStyles().get(Style.disabledColor); + color = listView.getStyle(Style.disabledColor); } - label.getStyles().put(Style.color, color); + label.putStyle(Style.color, color); } @Override @@ -300,8 +299,8 @@ public class TerraVFSBrowserSkin extends public static final String LAST_MODIFIED_KEY = "lastModified"; public TableViewFileRenderer() { - getStyles().put(Style.horizontalAlignment, HorizontalAlignment.CENTER); - getStyles().put(Style.padding, new Insets(2)); + putStyle(Style.horizontalAlignment, HorizontalAlignment.CENTER); + putStyle(Style.padding, new Insets(2)); } @Override @@ -322,7 +321,7 @@ public class TerraVFSBrowserSkin extends if (columnName.equals(NAME_KEY)) { text = file.getName().getBaseName(); icon = getIcon(file); - getStyles().put(Style.horizontalAlignment, HorizontalAlignment.LEFT); + putStyle(Style.horizontalAlignment, HorizontalAlignment.LEFT); } else if (columnName.equals(SIZE_KEY)) { if (type == FileType.FOLDER || type == FileType.IMAGINARY) { text = ""; @@ -330,7 +329,7 @@ public class TerraVFSBrowserSkin extends long length = file.getContent().getSize(); text = FileSizeFormat.getInstance().format(length); } - getStyles().put(Style.horizontalAlignment, HorizontalAlignment.RIGHT); + putStyle(Style.horizontalAlignment, HorizontalAlignment.RIGHT); } else if (columnName.equals(LAST_MODIFIED_KEY)) { if (type == FileType.FOLDER || type == FileType.IMAGINARY) { text = ""; @@ -338,7 +337,7 @@ public class TerraVFSBrowserSkin extends long lastModified = file.getContent().getLastModifiedTime(); Date lastModifiedDate = new Date(lastModified); text = DATE_FORMAT.format(lastModifiedDate); - getStyles().put(Style.horizontalAlignment, HorizontalAlignment.RIGHT); + putStyle(Style.horizontalAlignment, HorizontalAlignment.RIGHT); } } else { System.err.println("Unexpected column name in " + getClass().getName() @@ -351,28 +350,28 @@ public class TerraVFSBrowserSkin extends label.setText(text); imageView.setImage(icon); - imageView.getStyles().put(Style.opacity, + imageView.putStyle(Style.opacity, (tableView.isEnabled() && !disabled && !hidden) ? 1.0f : 0.5f); } - label.getStyles().copy(Style.font, tableView.getStyles()); + label.copyStyle(Style.font, tableView); - Color color; + Style colorStyle; if (tableView.isEnabled() && !disabled && !hidden) { if (selected) { if (tableView.isFocused()) { - color = tableView.getStyles().getColor(Style.selectionColor); + colorStyle = Style.selectionColor; } else { - color = tableView.getStyles().getColor(Style.inactiveSelectionColor); + colorStyle = Style.inactiveSelectionColor; } } else { - color = tableView.getStyles().getColor(Style.color); + colorStyle = Style.color; } } else { - color = tableView.getStyles().getColor(Style.disabledColor); + colorStyle = Style.disabledColor; } - label.getStyles().put(Style.color, color); + label.putStyle(Style.color, tableView.getStyleColor(colorStyle)); } @Override @@ -433,13 +432,13 @@ public class TerraVFSBrowserSkin extends } public DriveRenderer() { - getStyles().put(Style.verticalAlignment, VerticalAlignment.CENTER); + putStyle(Style.verticalAlignment, VerticalAlignment.CENTER); add(imageView); add(label); imageView.setPreferredSize(ICON_WIDTH, ICON_HEIGHT); - imageView.getStyles().put(Style.backgroundColor, null); + imageView.putStyle(Style.backgroundColor, null); } @Override @@ -458,7 +457,7 @@ public class TerraVFSBrowserSkin extends public static class ListButtonDriveRenderer extends DriveRenderer implements Button.DataRenderer { public ListButtonDriveRenderer() { - getStyles().put(Style.horizontalAlignment, HorizontalAlignment.LEFT); + putStyle(Style.horizontalAlignment, HorizontalAlignment.LEFT); } @Override @@ -468,7 +467,7 @@ public class TerraVFSBrowserSkin extends // Update the image view imageView.setImage(DRIVE_IMAGE); - imageView.getStyles().put(Style.opacity, button.isEnabled() ? 1.0f : 0.5f); + imageView.putStyle(Style.opacity, button.isEnabled() ? 1.0f : 0.5f); // Update the label label.setText(file.toString()); @@ -487,38 +486,38 @@ public class TerraVFSBrowserSkin extends public static class ListViewDriveRenderer extends DriveRenderer implements ListView.ItemRenderer { public ListViewDriveRenderer() { - getStyles().put(Style.horizontalAlignment, HorizontalAlignment.LEFT); - getStyles().put(Style.padding, new Insets(2, 3, 2, 3)); + putStyle(Style.horizontalAlignment, HorizontalAlignment.LEFT); + putStyle(Style.padding, new Insets(2, 3, 2, 3)); } @Override public void render(Object item, int index, ListView listView, boolean selected, Button.State state, boolean highlighted, boolean disabled) { - label.getStyles().copy(Style.font, listView.getStyles()); + label.copyStyle(Style.font, listView); Object color = null; if (listView.isEnabled() && !disabled) { if (selected) { if (listView.isFocused()) { - color = listView.getStyles().get(Style.selectionColor); + color = listView.getStyle(Style.selectionColor); } else { - color = listView.getStyles().get(Style.inactiveSelectionColor); + color = listView.getStyle(Style.inactiveSelectionColor); } } else { - color = listView.getStyles().get(Style.color); + color = listView.getStyle(Style.color); } } else { - color = listView.getStyles().get(Style.disabledColor); + color = listView.getStyle(Style.disabledColor); } - label.getStyles().put(Style.color, color); + label.putStyle(Style.color, color); if (item != null) { FileObject file = (FileObject) item; // Update the image view imageView.setImage(DRIVE_IMAGE); - imageView.getStyles().put(Style.opacity, + imageView.putStyle(Style.opacity, (listView.isEnabled() && !disabled) ? 1.0f : 0.5f); // Update the label @@ -1130,8 +1129,8 @@ public class TerraVFSBrowserSkin extends TextArea toolTipTextArea = new TextArea(); toolTipTextArea.setText(text); - toolTipTextArea.getStyles().put(Style.wrapText, true); - toolTipTextArea.getStyles().put(Style.backgroundColor, null); + toolTipTextArea.putStyle(Style.wrapText, true); + toolTipTextArea.putStyle(Style.backgroundColor, null); tooltip.setContent(toolTipTextArea); Modified: pivot/trunk/wtk/src/org/apache/pivot/wtk/Checkbox.java URL: http://svn.apache.org/viewvc/pivot/trunk/wtk/src/org/apache/pivot/wtk/Checkbox.java?rev=1887555&r1=1887554&r2=1887555&view=diff ============================================================================== --- pivot/trunk/wtk/src/org/apache/pivot/wtk/Checkbox.java (original) +++ pivot/trunk/wtk/src/org/apache/pivot/wtk/Checkbox.java Fri Mar 12 22:59:15 2021 @@ -28,7 +28,7 @@ public class Checkbox extends Button { private static final ButtonDataRenderer DEFAULT_DATA_RENDERER = new ButtonDataRenderer(); static { - DEFAULT_DATA_RENDERER.getStyles().put(Style.horizontalAlignment, HorizontalAlignment.LEFT); + DEFAULT_DATA_RENDERER.putStyle(Style.horizontalAlignment, HorizontalAlignment.LEFT); } public Checkbox() { Modified: pivot/trunk/wtk/src/org/apache/pivot/wtk/Component.java URL: http://svn.apache.org/viewvc/pivot/trunk/wtk/src/org/apache/pivot/wtk/Component.java?rev=1887555&r1=1887554&r2=1887555&view=diff ============================================================================== --- pivot/trunk/wtk/src/org/apache/pivot/wtk/Component.java (original) +++ pivot/trunk/wtk/src/org/apache/pivot/wtk/Component.java Fri Mar 12 22:59:15 2021 @@ -2250,7 +2250,7 @@ public abstract class Component implemen public final Object getStyle(final Style style) { return styleDictionary.get(style); } - + /** * Get the style value corresponding to the given style key. * @@ -2362,6 +2362,26 @@ public abstract class Component implemen } /** + * Copy the given style from the other component to this one. + * + * @param style The enumerated style key. + * @param comp The other component to copy the style from. + */ + public final void copyStyle(final Style style, final Component comp) { + styleDictionary.copy(style, comp.styleDictionary); + } + + /** + * Copy the given style from the other component to this one. + * + * @param style The style key. + * @param comp The other component to copy the style from. + */ + public final void copyStyle(final String style, final Component comp) { + styleDictionary.copy(style, comp.styleDictionary); + } + + /** * Applies a set of styles. * * @param styles A map containing the styles to apply. Modified: pivot/trunk/wtk/src/org/apache/pivot/wtk/MenuButton.java URL: http://svn.apache.org/viewvc/pivot/trunk/wtk/src/org/apache/pivot/wtk/MenuButton.java?rev=1887555&r1=1887554&r2=1887555&view=diff ============================================================================== --- pivot/trunk/wtk/src/org/apache/pivot/wtk/MenuButton.java (original) +++ pivot/trunk/wtk/src/org/apache/pivot/wtk/MenuButton.java Fri Mar 12 22:59:15 2021 @@ -51,7 +51,7 @@ public class MenuButton extends Button { setDataRenderer(DEFAULT_DATA_RENDERER); installSkin(MenuButton.class); setQueuedAction(true); - setQueuedActionDelay(getStyles().getInt(Style.closeTransitionDuration) + 50); + setQueuedActionDelay(getStyleInt(Style.closeTransitionDuration) + 50); } @Override Modified: pivot/trunk/wtk/src/org/apache/pivot/wtk/RadioButton.java URL: http://svn.apache.org/viewvc/pivot/trunk/wtk/src/org/apache/pivot/wtk/RadioButton.java?rev=1887555&r1=1887554&r2=1887555&view=diff ============================================================================== --- pivot/trunk/wtk/src/org/apache/pivot/wtk/RadioButton.java (original) +++ pivot/trunk/wtk/src/org/apache/pivot/wtk/RadioButton.java Fri Mar 12 22:59:15 2021 @@ -28,7 +28,7 @@ public class RadioButton extends Button private static final ButtonDataRenderer DEFAULT_DATA_RENDERER = new ButtonDataRenderer(); static { - DEFAULT_DATA_RENDERER.getStyles().put(Style.horizontalAlignment, HorizontalAlignment.LEFT); + DEFAULT_DATA_RENDERER.putStyle(Style.horizontalAlignment, HorizontalAlignment.LEFT); } public RadioButton() { Modified: pivot/trunk/wtk/src/org/apache/pivot/wtk/content/AccordionHeaderDataRenderer.java URL: http://svn.apache.org/viewvc/pivot/trunk/wtk/src/org/apache/pivot/wtk/content/AccordionHeaderDataRenderer.java?rev=1887555&r1=1887554&r2=1887555&view=diff ============================================================================== --- pivot/trunk/wtk/src/org/apache/pivot/wtk/content/AccordionHeaderDataRenderer.java (original) +++ pivot/trunk/wtk/src/org/apache/pivot/wtk/content/AccordionHeaderDataRenderer.java Fri Mar 12 22:59:15 2021 @@ -25,6 +25,6 @@ import org.apache.pivot.wtk.Style; public class AccordionHeaderDataRenderer extends ButtonDataRenderer { /** Construct and set the alignment to {@link HorizontalAlignment#LEFT}. */ public AccordionHeaderDataRenderer() { - getStyles().put(Style.horizontalAlignment, HorizontalAlignment.LEFT); + putStyle(Style.horizontalAlignment, HorizontalAlignment.LEFT); } } Modified: pivot/trunk/wtk/src/org/apache/pivot/wtk/content/ButtonDataRenderer.java URL: http://svn.apache.org/viewvc/pivot/trunk/wtk/src/org/apache/pivot/wtk/content/ButtonDataRenderer.java?rev=1887555&r1=1887554&r2=1887555&view=diff ============================================================================== --- pivot/trunk/wtk/src/org/apache/pivot/wtk/content/ButtonDataRenderer.java (original) +++ pivot/trunk/wtk/src/org/apache/pivot/wtk/content/ButtonDataRenderer.java Fri Mar 12 22:59:15 2021 @@ -37,13 +37,13 @@ public class ButtonDataRenderer extends protected Label label = new Label(); public ButtonDataRenderer() { - getStyles().put(Style.horizontalAlignment, HorizontalAlignment.CENTER); - getStyles().put(Style.verticalAlignment, VerticalAlignment.CENTER); + putStyle(Style.horizontalAlignment, HorizontalAlignment.CENTER); + putStyle(Style.verticalAlignment, VerticalAlignment.CENTER); add(imageView); add(label); - imageView.getStyles().put(Style.backgroundColor, null); + imageView.putStyle(Style.backgroundColor, null); } @Override @@ -75,12 +75,12 @@ public class ButtonDataRenderer extends imageView.setVisible(true); imageView.setImage(icon); - imageView.getStyles().put(Style.opacity, button.isEnabled() ? Float.valueOf(1.0f) : Float.valueOf(0.5f)); + imageView.putStyle(Style.opacity, button.isEnabled() ? Float.valueOf(1.0f) : Float.valueOf(0.5f)); if (getFillIcon()) { int buttonWidth = button.getWidth(); int buttonHeight = button.getHeight(); - Insets padding = (Insets) button.getStyles().get(Style.padding); + Insets padding = (Insets) button.getStyle(Style.padding); if (buttonWidth > 0) { imageView.setPreferredWidth(Math.max(buttonWidth - (padding.left + padding.right + 2), 0)); @@ -100,17 +100,17 @@ public class ButtonDataRenderer extends } else { label.setVisible(true); - Font font = button.getStyles().getFont(Style.font); - label.getStyles().put(Style.font, font); + Font font = button.getStyleFont(Style.font); + label.putStyle(Style.font, font); Color color; if (button.isEnabled()) { - color = button.getStyles().getColor(Style.color); + color = button.getStyleColor(Style.color); } else { - color = button.getStyles().getColor(Style.disabledColor); + color = button.getStyleColor(Style.disabledColor); } - label.getStyles().put(Style.color, color); + label.putStyle(Style.color, color); } } @@ -139,12 +139,12 @@ public class ButtonDataRenderer extends } public boolean getFillIcon() { - return imageView.getStyles().getBoolean(Style.fill); + return imageView.getStyleBoolean(Style.fill); } public void setFillIcon(boolean fillIcon) { - imageView.getStyles().put(Style.fill, fillIcon); - getStyles().put(Style.fill, fillIcon); + imageView.putStyle(Style.fill, fillIcon); + putStyle(Style.fill, fillIcon); } @Override Modified: pivot/trunk/wtk/src/org/apache/pivot/wtk/content/CalendarButtonDataRenderer.java URL: http://svn.apache.org/viewvc/pivot/trunk/wtk/src/org/apache/pivot/wtk/content/CalendarButtonDataRenderer.java?rev=1887555&r1=1887554&r2=1887555&view=diff ============================================================================== --- pivot/trunk/wtk/src/org/apache/pivot/wtk/content/CalendarButtonDataRenderer.java (original) +++ pivot/trunk/wtk/src/org/apache/pivot/wtk/content/CalendarButtonDataRenderer.java Fri Mar 12 22:59:15 2021 @@ -30,7 +30,7 @@ import org.apache.pivot.wtk.Style; */ public class CalendarButtonDataRenderer extends ButtonDataRenderer { public CalendarButtonDataRenderer() { - getStyles().put(Style.horizontalAlignment, HorizontalAlignment.LEFT); + putStyle(Style.horizontalAlignment, HorizontalAlignment.LEFT); } @Override Modified: pivot/trunk/wtk/src/org/apache/pivot/wtk/content/LinkButtonDataRenderer.java URL: http://svn.apache.org/viewvc/pivot/trunk/wtk/src/org/apache/pivot/wtk/content/LinkButtonDataRenderer.java?rev=1887555&r1=1887554&r2=1887555&view=diff ============================================================================== --- pivot/trunk/wtk/src/org/apache/pivot/wtk/content/LinkButtonDataRenderer.java (original) +++ pivot/trunk/wtk/src/org/apache/pivot/wtk/content/LinkButtonDataRenderer.java Fri Mar 12 22:59:15 2021 @@ -36,7 +36,7 @@ public class LinkButtonDataRenderer exte @SuppressWarnings("unused") public LinkButtonDataRenderer() { - getStyles().put(Style.horizontalSpacing, 4); + putStyle(Style.horizontalSpacing, 4); new TablePane.Column(this); new TablePane.Column(this, 1, true); @@ -45,7 +45,7 @@ public class LinkButtonDataRenderer exte row.add(imageView); row.add(label); - label.getStyles().put(Style.wrapText, true); + label.putStyle(Style.wrapText, true); } @Override @@ -77,7 +77,7 @@ public class LinkButtonDataRenderer exte imageView.setVisible(true); imageView.setImage(icon); - imageView.getStyles().put(Style.opacity, Float.valueOf(button.isEnabled() ? 1.0f : 0.5f)); + imageView.putStyle(Style.opacity, Float.valueOf(button.isEnabled() ? 1.0f : 0.5f)); } // Update the label @@ -88,20 +88,20 @@ public class LinkButtonDataRenderer exte } else { label.setVisible(true); - Font font = button.getStyles().getFont(Style.font); - label.getStyles().put(Style.font, font); + Font font = button.getStyleFont(Style.font); + label.putStyle(Style.font, font); Color color; if (button.isEnabled()) { - color = button.getStyles().getColor(Style.color); + color = button.getStyleColor(Style.color); } else { - color = button.getStyles().getColor(Style.disabledColor); + color = button.getStyleColor(Style.disabledColor); } - label.getStyles().put(Style.color, color); + label.putStyle(Style.color, color); } - label.getStyles().put(Style.textDecoration, highlighted ? TextDecoration.UNDERLINE : null); + label.putStyle(Style.textDecoration, highlighted ? TextDecoration.UNDERLINE : null); } @Override Modified: pivot/trunk/wtk/src/org/apache/pivot/wtk/content/ListButtonDataRenderer.java URL: http://svn.apache.org/viewvc/pivot/trunk/wtk/src/org/apache/pivot/wtk/content/ListButtonDataRenderer.java?rev=1887555&r1=1887554&r2=1887555&view=diff ============================================================================== --- pivot/trunk/wtk/src/org/apache/pivot/wtk/content/ListButtonDataRenderer.java (original) +++ pivot/trunk/wtk/src/org/apache/pivot/wtk/content/ListButtonDataRenderer.java Fri Mar 12 22:59:15 2021 @@ -28,7 +28,7 @@ public class ListButtonDataRenderer exte * Default constructor - set necessary styles. */ public ListButtonDataRenderer() { - getStyles().put(Style.horizontalAlignment, HorizontalAlignment.LEFT); + putStyle(Style.horizontalAlignment, HorizontalAlignment.LEFT); } @Override Modified: pivot/trunk/wtk/src/org/apache/pivot/wtk/content/ListViewItemEditor.java URL: http://svn.apache.org/viewvc/pivot/trunk/wtk/src/org/apache/pivot/wtk/content/ListViewItemEditor.java?rev=1887555&r1=1887554&r2=1887555&view=diff ============================================================================== --- pivot/trunk/wtk/src/org/apache/pivot/wtk/content/ListViewItemEditor.java (original) +++ pivot/trunk/wtk/src/org/apache/pivot/wtk/content/ListViewItemEditor.java Fri Mar 12 22:59:15 2021 @@ -108,7 +108,7 @@ public class ListViewItemEditor extends Bounds textBounds = itemRenderer.getTextBounds(); // Calculate the bounds of what is being edited - Insets padding = (Insets) textInput.getStyles().get(Style.padding); + Insets padding = (Insets) textInput.getStyle(Style.padding); Bounds editBounds = new Bounds(itemBounds.x + textBounds.x - (padding.left + 1), itemBounds.y, itemBounds.width - textBounds.x + (padding.left + 1), itemBounds.height); Modified: pivot/trunk/wtk/src/org/apache/pivot/wtk/content/ListViewItemRenderer.java URL: http://svn.apache.org/viewvc/pivot/trunk/wtk/src/org/apache/pivot/wtk/content/ListViewItemRenderer.java?rev=1887555&r1=1887554&r2=1887555&view=diff ============================================================================== --- pivot/trunk/wtk/src/org/apache/pivot/wtk/content/ListViewItemRenderer.java (original) +++ pivot/trunk/wtk/src/org/apache/pivot/wtk/content/ListViewItemRenderer.java Fri Mar 12 22:59:15 2021 @@ -16,8 +16,6 @@ */ package org.apache.pivot.wtk.content; -import java.awt.Color; - import org.apache.pivot.wtk.Bounds; import org.apache.pivot.wtk.BoxPane; import org.apache.pivot.wtk.Button; @@ -42,9 +40,9 @@ public class ListViewItemRenderer extend public static final boolean DEFAULT_SHOW_ICON = false; public ListViewItemRenderer() { - getStyles().put(Style.horizontalAlignment, HorizontalAlignment.LEFT); - getStyles().put(Style.verticalAlignment, VerticalAlignment.CENTER); - getStyles().put(Style.padding, new Insets(2, 3, 2, 3)); + putStyle(Style.horizontalAlignment, HorizontalAlignment.LEFT); + putStyle(Style.verticalAlignment, VerticalAlignment.CENTER); + putStyle(Style.padding, new Insets(2, 3, 2, 3)); add(imageView); add(label); @@ -84,26 +82,26 @@ public class ListViewItemRenderer extend protected void renderStyles(ListView listView, boolean selected, @SuppressWarnings("unused") boolean highlighted, boolean disabled) { - imageView.getStyles().put(Style.opacity, listView.isEnabled() ? 1.0f : 0.5f); + imageView.putStyle(Style.opacity, listView.isEnabled() ? 1.0f : 0.5f); - label.getStyles().copy(Style.font, listView.getStyles()); + label.copyStyle(Style.font, listView); - Color color; + Style colorStyle; if (listView.isEnabled() && !disabled) { if (selected) { if (listView.isFocused()) { - color = listView.getStyles().getColor(Style.selectionColor); + colorStyle = Style.selectionColor; } else { - color = listView.getStyles().getColor(Style.inactiveSelectionColor); + colorStyle = Style.inactiveSelectionColor; } } else { - color = listView.getStyles().getColor(Style.color); + colorStyle = Style.color; } } else { - color = listView.getStyles().getColor(Style.disabledColor); + colorStyle = Style.disabledColor; } - label.getStyles().put(Style.color, color); + label.putStyle(Style.color, listView.getStyleColor(colorStyle)); } @Override @@ -147,11 +145,11 @@ public class ListViewItemRenderer extend } public boolean getFillIcon() { - return imageView.getStyles().getBoolean(Style.fill); + return imageView.getStyleBoolean(Style.fill); } public void setFillIcon(boolean fillIcon) { - imageView.getStyles().put(Style.fill, fillIcon); + imageView.putStyle(Style.fill, fillIcon); } /** Modified: pivot/trunk/wtk/src/org/apache/pivot/wtk/content/MenuBarItemDataRenderer.java URL: http://svn.apache.org/viewvc/pivot/trunk/wtk/src/org/apache/pivot/wtk/content/MenuBarItemDataRenderer.java?rev=1887555&r1=1887554&r2=1887555&view=diff ============================================================================== --- pivot/trunk/wtk/src/org/apache/pivot/wtk/content/MenuBarItemDataRenderer.java (original) +++ pivot/trunk/wtk/src/org/apache/pivot/wtk/content/MenuBarItemDataRenderer.java Fri Mar 12 22:59:15 2021 @@ -38,14 +38,14 @@ public class MenuBarItemDataRenderer ext protected Label label = new Label(); public MenuBarItemDataRenderer() { - getStyles().put(Style.horizontalAlignment, HorizontalAlignment.LEFT); - getStyles().put(Style.verticalAlignment, VerticalAlignment.CENTER); - getStyles().put(Style.padding, new Insets(4, 6, 4, 6)); + putStyle(Style.horizontalAlignment, HorizontalAlignment.LEFT); + putStyle(Style.verticalAlignment, VerticalAlignment.CENTER); + putStyle(Style.padding, new Insets(4, 6, 4, 6)); add(imageView); add(label); - imageView.getStyles().put(Style.backgroundColor, null); + imageView.putStyle(Style.backgroundColor, null); } @Override @@ -79,7 +79,7 @@ public class MenuBarItemDataRenderer ext } else { imageView.setVisible(true); imageView.setImage(icon); - imageView.getStyles().put(Style.opacity, button.isEnabled() ? 1.0f : 0.5f); + imageView.putStyle(Style.opacity, button.isEnabled() ? 1.0f : 0.5f); } // Update the label @@ -90,21 +90,21 @@ public class MenuBarItemDataRenderer ext } else { label.setVisible(true); - Font font = menuBar.getStyles().getFont(Style.font); - label.getStyles().put(Style.font, font); + Font font = menuBar.getStyleFont(Style.font); + label.putStyle(Style.font, font); Color color; if (button.isEnabled()) { if (highlighted) { - color = menuBar.getStyles().getColor(Style.activeColor); + color = menuBar.getStyleColor(Style.activeColor); } else { - color = menuBar.getStyles().getColor(Style.color); + color = menuBar.getStyleColor(Style.color); } } else { - color = menuBar.getStyles().getColor(Style.disabledColor); + color = menuBar.getStyleColor(Style.disabledColor); } - label.getStyles().put(Style.color, color); + label.putStyle(Style.color, color); } } Modified: pivot/trunk/wtk/src/org/apache/pivot/wtk/content/MenuButtonDataRenderer.java URL: http://svn.apache.org/viewvc/pivot/trunk/wtk/src/org/apache/pivot/wtk/content/MenuButtonDataRenderer.java?rev=1887555&r1=1887554&r2=1887555&view=diff ============================================================================== --- pivot/trunk/wtk/src/org/apache/pivot/wtk/content/MenuButtonDataRenderer.java (original) +++ pivot/trunk/wtk/src/org/apache/pivot/wtk/content/MenuButtonDataRenderer.java Fri Mar 12 22:59:15 2021 @@ -25,7 +25,7 @@ import org.apache.pivot.wtk.Style; */ public class MenuButtonDataRenderer extends ButtonDataRenderer { public MenuButtonDataRenderer() { - getStyles().put(Style.horizontalAlignment, HorizontalAlignment.LEFT); + putStyle(Style.horizontalAlignment, HorizontalAlignment.LEFT); } @Override Modified: pivot/trunk/wtk/src/org/apache/pivot/wtk/content/MenuItemDataRenderer.java URL: http://svn.apache.org/viewvc/pivot/trunk/wtk/src/org/apache/pivot/wtk/content/MenuItemDataRenderer.java?rev=1887555&r1=1887554&r2=1887555&view=diff ============================================================================== --- pivot/trunk/wtk/src/org/apache/pivot/wtk/content/MenuItemDataRenderer.java (original) +++ pivot/trunk/wtk/src/org/apache/pivot/wtk/content/MenuItemDataRenderer.java Fri Mar 12 22:59:15 2021 @@ -41,7 +41,7 @@ public class MenuItemDataRenderer extend @SuppressWarnings("unused") public MenuItemDataRenderer() { - getStyles().put(Style.padding, new Insets(2)); + putStyle(Style.padding, new Insets(2)); new TablePane.Column(this, 1, true); new TablePane.Column(this); @@ -49,14 +49,14 @@ public class MenuItemDataRenderer extend BoxPane boxPane = new BoxPane(); boxPane.add(imageView); boxPane.add(textLabel); - boxPane.getStyles().put(Style.verticalAlignment, VerticalAlignment.CENTER); - boxPane.getStyles().put(Style.padding, new Insets(0, 0, 0, 6)); + boxPane.putStyle(Style.verticalAlignment, VerticalAlignment.CENTER); + boxPane.putStyle(Style.padding, new Insets(0, 0, 0, 6)); TablePane.Row row = new TablePane.Row(this); row.add(boxPane); row.add(keyboardShortcutLabel); - imageView.getStyles().put(Style.backgroundColor, null); + imageView.putStyle(Style.backgroundColor, null); } @Override @@ -90,44 +90,45 @@ public class MenuItemDataRenderer extend // If the button is selected, icon is a checkmark; otherwise, // attempt to retrieve icon from button data if (button.isSelected()) { - icon = (Image) button.getStyles().get(Style.checkmarkImage); + icon = (Image) button.getStyle(Style.checkmarkImage); } // Update the image view Menu.Item menuItem = (Menu.Item) button; Menu menu = (Menu) menuItem.getParent(); - int margin = menu.getStyles().getInt(Style.margin); - Insets padding = (Insets) getStyles().get(Style.padding); + int margin = menu.getStyleInt(Style.margin); + Insets padding = (Insets) getStyle(Style.padding); imageView.setImage(icon); imageView.setPreferredWidth(margin - padding.left * 2); - imageView.getStyles().put(Style.opacity, Float.valueOf(button.isEnabled() ? 1.0f : 0.5f)); + imageView.putStyle(Style.opacity, Float.valueOf(button.isEnabled() ? 1.0f : 0.5f)); // Update the labels textLabel.setText(text != null ? text : ""); - Font font = menu.getStyles().getFont(Style.font); - textLabel.getStyles().put(Style.font, font); - keyboardShortcutLabel.getStyles().put(Style.font, font.deriveFont(Font.ITALIC)); + Font font = menu.getStyleFont(Style.font); + textLabel.putStyle(Style.font, font); + keyboardShortcutLabel.putStyle(Style.font, font.deriveFont(Font.ITALIC)); - Color color; + Style colorStyle; if (button.isEnabled()) { if (highlighted) { - color = menu.getStyles().getColor(Style.activeColor); + colorStyle = Style.activeColor; } else { - color = menu.getStyles().getColor(Style.color); + colorStyle = Style.color; } } else { - color = menu.getStyles().getColor(Style.disabledColor); + colorStyle = Style.disabledColor; } - textLabel.getStyles().put(Style.color, color); - keyboardShortcutLabel.getStyles().put(Style.color, color); + Color color = menu.getStyleColor(colorStyle); + textLabel.putStyle(Style.color, color); + keyboardShortcutLabel.putStyle(Style.color, color); boolean showKeyboardShortcuts = false; if (menu.getStyles().containsKey(Style.showKeyboardShortcuts)) { - showKeyboardShortcuts = menu.getStyles().getBoolean(Style.showKeyboardShortcuts); + showKeyboardShortcuts = menu.getStyleBoolean(Style.showKeyboardShortcuts); } if (showKeyboardShortcuts) { Modified: pivot/trunk/wtk/src/org/apache/pivot/wtk/content/SpinnerItemRenderer.java URL: http://svn.apache.org/viewvc/pivot/trunk/wtk/src/org/apache/pivot/wtk/content/SpinnerItemRenderer.java?rev=1887555&r1=1887554&r2=1887555&view=diff ============================================================================== --- pivot/trunk/wtk/src/org/apache/pivot/wtk/content/SpinnerItemRenderer.java (original) +++ pivot/trunk/wtk/src/org/apache/pivot/wtk/content/SpinnerItemRenderer.java Fri Mar 12 22:59:15 2021 @@ -16,8 +16,6 @@ */ package org.apache.pivot.wtk.content; -import java.awt.Color; - import org.apache.pivot.wtk.Insets; import org.apache.pivot.wtk.Label; import org.apache.pivot.wtk.Spinner; @@ -30,8 +28,8 @@ import org.apache.pivot.wtk.VerticalAlig */ public class SpinnerItemRenderer extends Label implements Spinner.ItemRenderer { public SpinnerItemRenderer() { - getStyles().put(Style.verticalAlignment, VerticalAlignment.CENTER); - getStyles().put(Style.padding, new Insets(2)); + putStyle(Style.verticalAlignment, VerticalAlignment.CENTER); + putStyle(Style.padding, new Insets(2)); } @Override @@ -52,16 +50,16 @@ public class SpinnerItemRenderer extends } protected void renderStyles(Spinner spinner) { - getStyles().copy(Style.font, spinner.getStyles()); + copyStyle(Style.font, spinner); - Color color; + Style colorStyle; if (spinner.isEnabled()) { - color = spinner.getStyles().getColor(Style.color); + colorStyle = Style.color; } else { - color = spinner.getStyles().getColor(Style.disabledColor); + colorStyle = Style.disabledColor; } - getStyles().put(Style.color, color); + putStyle(Style.color, spinner.getStyleColor(colorStyle)); } @Override Modified: pivot/trunk/wtk/src/org/apache/pivot/wtk/content/TableViewCellRenderer.java URL: http://svn.apache.org/viewvc/pivot/trunk/wtk/src/org/apache/pivot/wtk/content/TableViewCellRenderer.java?rev=1887555&r1=1887554&r2=1887555&view=diff ============================================================================== --- pivot/trunk/wtk/src/org/apache/pivot/wtk/content/TableViewCellRenderer.java (original) +++ pivot/trunk/wtk/src/org/apache/pivot/wtk/content/TableViewCellRenderer.java Fri Mar 12 22:59:15 2021 @@ -16,10 +16,7 @@ */ package org.apache.pivot.wtk.content; -import java.awt.Color; - import org.apache.pivot.json.JSON; -import org.apache.pivot.wtk.Component; import org.apache.pivot.wtk.Insets; import org.apache.pivot.wtk.Label; import org.apache.pivot.wtk.Style; @@ -31,8 +28,8 @@ import org.apache.pivot.wtk.VerticalAlig */ public class TableViewCellRenderer extends Label implements TableView.CellRenderer { public TableViewCellRenderer() { - getStyles().put(Style.verticalAlignment, VerticalAlignment.CENTER); - getStyles().put(Style.padding, new Insets(2)); + putStyle(Style.verticalAlignment, VerticalAlignment.CENTER); + putStyle(Style.padding, new Insets(2)); } @Override @@ -58,27 +55,24 @@ public class TableViewCellRenderer exten } protected void renderStyles(TableView tableView, boolean rowSelected, boolean rowDisabled) { - Component.StyleDictionary tableViewStyles = tableView.getStyles(); - Component.StyleDictionary styles = getStyles(); - - styles.copy(Style.font, tableViewStyles); + copyStyle(Style.font, tableView); - Color color; + Style colorStyle; if (tableView.isEnabled() && !rowDisabled) { if (rowSelected) { if (tableView.isFocused()) { - color = tableViewStyles.getColor(Style.selectionColor); + colorStyle = Style.selectionColor; } else { - color = tableViewStyles.getColor(Style.inactiveSelectionColor); + colorStyle = Style.inactiveSelectionColor; } } else { - color = tableViewStyles.getColor(Style.color); + colorStyle = Style.color; } } else { - color = tableViewStyles.getColor(Style.disabledColor); + colorStyle = Style.disabledColor; } - styles.put(Style.color, color); + putStyle(Style.color, tableView.getStyleColor(colorStyle)); } @Override Modified: pivot/trunk/wtk/src/org/apache/pivot/wtk/content/TableViewCheckboxCellRenderer.java URL: http://svn.apache.org/viewvc/pivot/trunk/wtk/src/org/apache/pivot/wtk/content/TableViewCheckboxCellRenderer.java?rev=1887555&r1=1887554&r2=1887555&view=diff ============================================================================== --- pivot/trunk/wtk/src/org/apache/pivot/wtk/content/TableViewCheckboxCellRenderer.java (original) +++ pivot/trunk/wtk/src/org/apache/pivot/wtk/content/TableViewCheckboxCellRenderer.java Fri Mar 12 22:59:15 2021 @@ -35,9 +35,9 @@ public class TableViewCheckboxCellRender public TableViewCheckboxCellRenderer() { add(checkbox); - getStyles().put(Style.padding, 3); - getStyles().put(Style.verticalAlignment, VerticalAlignment.CENTER); - getStyles().put(Style.horizontalAlignment, HorizontalAlignment.CENTER); + putStyle(Style.padding, 3); + putStyle(Style.verticalAlignment, VerticalAlignment.CENTER); + putStyle(Style.horizontalAlignment, HorizontalAlignment.CENTER); } @Override Modified: pivot/trunk/wtk/src/org/apache/pivot/wtk/content/TableViewFileSizeCellRenderer.java URL: http://svn.apache.org/viewvc/pivot/trunk/wtk/src/org/apache/pivot/wtk/content/TableViewFileSizeCellRenderer.java?rev=1887555&r1=1887554&r2=1887555&view=diff ============================================================================== --- pivot/trunk/wtk/src/org/apache/pivot/wtk/content/TableViewFileSizeCellRenderer.java (original) +++ pivot/trunk/wtk/src/org/apache/pivot/wtk/content/TableViewFileSizeCellRenderer.java Fri Mar 12 22:59:15 2021 @@ -28,11 +28,11 @@ import org.apache.pivot.wtk.Style; */ public class TableViewFileSizeCellRenderer extends TableViewCellRenderer { public TableViewFileSizeCellRenderer() { - getStyles().put(Style.horizontalAlignment, HorizontalAlignment.RIGHT); + putStyle(Style.horizontalAlignment, HorizontalAlignment.RIGHT); // Apply more padding on the right so the right-aligned cells don't // appear to run into left-aligned cells in the next column - getStyles().put(Style.padding, new Insets(2, 2, 2, 6)); + putStyle(Style.padding, new Insets(2, 2, 2, 6)); } @Override Modified: pivot/trunk/wtk/src/org/apache/pivot/wtk/content/TableViewHeaderDataRenderer.java URL: http://svn.apache.org/viewvc/pivot/trunk/wtk/src/org/apache/pivot/wtk/content/TableViewHeaderDataRenderer.java?rev=1887555&r1=1887554&r2=1887555&view=diff ============================================================================== --- pivot/trunk/wtk/src/org/apache/pivot/wtk/content/TableViewHeaderDataRenderer.java (original) +++ pivot/trunk/wtk/src/org/apache/pivot/wtk/content/TableViewHeaderDataRenderer.java Fri Mar 12 22:59:15 2021 @@ -20,7 +20,6 @@ import java.awt.Color; import java.awt.Font; import org.apache.pivot.wtk.BoxPane; -import org.apache.pivot.wtk.Component; import org.apache.pivot.wtk.HorizontalAlignment; import org.apache.pivot.wtk.ImageView; import org.apache.pivot.wtk.Insets; @@ -39,9 +38,9 @@ public class TableViewHeaderDataRenderer protected Label label = new Label(); public TableViewHeaderDataRenderer() { - getStyles().put(Style.horizontalAlignment, HorizontalAlignment.LEFT); - getStyles().put(Style.verticalAlignment, VerticalAlignment.CENTER); - getStyles().put(Style.padding, new Insets(1, 2, 1, 2)); + putStyle(Style.horizontalAlignment, HorizontalAlignment.LEFT); + putStyle(Style.verticalAlignment, VerticalAlignment.CENTER); + putStyle(Style.padding, new Insets(1, 2, 1, 2)); add(imageView); add(label); @@ -77,7 +76,7 @@ public class TableViewHeaderDataRenderer imageView.setVisible(false); } else { imageView.setVisible(true); - imageView.getStyles().put(Style.opacity, tableViewHeader.isEnabled() ? 1.0f : 0.5f); + imageView.putStyle(Style.opacity, tableViewHeader.isEnabled() ? 1.0f : 0.5f); } // Show/hide the label @@ -89,22 +88,20 @@ public class TableViewHeaderDataRenderer label.setVisible(true); // Update the label styles - Component.StyleDictionary labelStyles = label.getStyles(); - - Object labelFont = tableViewHeader.getStyles().get(Style.font); + Object labelFont = tableViewHeader.getStyle(Style.font); if (labelFont instanceof Font) { - labelStyles.put(Style.font, labelFont); + label.putStyle(Style.font, labelFont); } Object color = null; if (tableViewHeader.isEnabled()) { - color = tableViewHeader.getStyles().get(Style.color); + color = tableViewHeader.getStyle(Style.color); } else { - color = tableViewHeader.getStyles().get(Style.disabledColor); + color = tableViewHeader.getStyle(Style.disabledColor); } if (color instanceof Color) { - labelStyles.put(Style.color, color); + label.putStyle(Style.color, color); } } } Modified: pivot/trunk/wtk/src/org/apache/pivot/wtk/content/TableViewImageCellRenderer.java URL: http://svn.apache.org/viewvc/pivot/trunk/wtk/src/org/apache/pivot/wtk/content/TableViewImageCellRenderer.java?rev=1887555&r1=1887554&r2=1887555&view=diff ============================================================================== --- pivot/trunk/wtk/src/org/apache/pivot/wtk/content/TableViewImageCellRenderer.java (original) +++ pivot/trunk/wtk/src/org/apache/pivot/wtk/content/TableViewImageCellRenderer.java Fri Mar 12 22:59:15 2021 @@ -79,7 +79,7 @@ public class TableViewImageCellRenderer } setImage(image); - getStyles().put(Style.opacity, disabled ? 0.5f : 1.0f); + putStyle(Style.opacity, disabled ? 0.5f : 1.0f); } } Modified: pivot/trunk/wtk/src/org/apache/pivot/wtk/content/TableViewNumberCellRenderer.java URL: http://svn.apache.org/viewvc/pivot/trunk/wtk/src/org/apache/pivot/wtk/content/TableViewNumberCellRenderer.java?rev=1887555&r1=1887554&r2=1887555&view=diff ============================================================================== --- pivot/trunk/wtk/src/org/apache/pivot/wtk/content/TableViewNumberCellRenderer.java (original) +++ pivot/trunk/wtk/src/org/apache/pivot/wtk/content/TableViewNumberCellRenderer.java Fri Mar 12 22:59:15 2021 @@ -35,11 +35,11 @@ public class TableViewNumberCellRenderer public static final NumberFormat DEFAULT_NUMBER_FORMAT = NumberFormat.getNumberInstance(); public TableViewNumberCellRenderer() { - getStyles().put(Style.horizontalAlignment, HorizontalAlignment.RIGHT); + putStyle(Style.horizontalAlignment, HorizontalAlignment.RIGHT); // Apply more padding on the right so the right-aligned cells don't // appear to run into left-aligned cells in the next column - getStyles().put(Style.padding, new Insets(2, 2, 2, 6)); + putStyle(Style.padding, new Insets(2, 2, 2, 6)); } public NumberFormat getNumberFormat() { Modified: pivot/trunk/wtk/src/org/apache/pivot/wtk/content/TableViewRowEditor.java URL: http://svn.apache.org/viewvc/pivot/trunk/wtk/src/org/apache/pivot/wtk/content/TableViewRowEditor.java?rev=1887555&r1=1887554&r2=1887555&view=diff ============================================================================== --- pivot/trunk/wtk/src/org/apache/pivot/wtk/content/TableViewRowEditor.java (original) +++ pivot/trunk/wtk/src/org/apache/pivot/wtk/content/TableViewRowEditor.java Fri Mar 12 22:59:15 2021 @@ -140,7 +140,7 @@ public class TableViewRowEditor extends } }); - tablePane.getStyles().put(Style.horizontalSpacing, 1); + tablePane.putStyle(Style.horizontalSpacing, 1); tablePane.getRows().add(editorRow); } @@ -298,8 +298,7 @@ public class TableViewRowEditor extends * @return The edit effect, or {@code null} for no effect. */ public CardPaneSkin.SelectionChangeEffect getEditEffect() { - return (CardPaneSkin.SelectionChangeEffect) cardPane.getStyles().get( - Style.selectionChangeEffect); + return (CardPaneSkin.SelectionChangeEffect) cardPane.getStyle(Style.selectionChangeEffect); } /** @@ -308,7 +307,7 @@ public class TableViewRowEditor extends * @param editEffect The edit effect, or {@code null} for no effect. */ public void setEditEffect(CardPaneSkin.SelectionChangeEffect editEffect) { - cardPane.getStyles().put(Style.selectionChangeEffect, editEffect); + cardPane.putStyle(Style.selectionChangeEffect, editEffect); } /** @@ -317,7 +316,7 @@ public class TableViewRowEditor extends * @return The effect duration in milliseconds. */ public int getEditEffectDuration() { - return cardPane.getStyles().getInt(Style.selectionChangeDuration); + return cardPane.getStyleInt(Style.selectionChangeDuration); } /** @@ -326,7 +325,7 @@ public class TableViewRowEditor extends * @param effectDuration The effect duration in milliseconds. */ public void setEditEffectDuration(int effectDuration) { - cardPane.getStyles().put(Style.selectionChangeDuration, effectDuration); + cardPane.putStyle(Style.selectionChangeDuration, effectDuration); } /** @@ -335,7 +334,7 @@ public class TableViewRowEditor extends * @return The effect rate. */ public int getEditEffectRate() { - return cardPane.getStyles().getInt(Style.selectionChangeRate); + return cardPane.getStyleInt(Style.selectionChangeRate); } /** @@ -344,7 +343,7 @@ public class TableViewRowEditor extends * @param effectRate The effect rate. */ public void setEditEffectRate(int effectRate) { - cardPane.getStyles().put(Style.selectionChangeRate, effectRate); + cardPane.putStyle(Style.selectionChangeRate, effectRate); } @Override Modified: pivot/trunk/wtk/src/org/apache/pivot/wtk/content/TableViewTextAreaCellRenderer.java URL: http://svn.apache.org/viewvc/pivot/trunk/wtk/src/org/apache/pivot/wtk/content/TableViewTextAreaCellRenderer.java?rev=1887555&r1=1887554&r2=1887555&view=diff ============================================================================== --- pivot/trunk/wtk/src/org/apache/pivot/wtk/content/TableViewTextAreaCellRenderer.java (original) +++ pivot/trunk/wtk/src/org/apache/pivot/wtk/content/TableViewTextAreaCellRenderer.java Fri Mar 12 22:59:15 2021 @@ -16,10 +16,7 @@ */ package org.apache.pivot.wtk.content; -import java.awt.Color; - import org.apache.pivot.json.JSON; -import org.apache.pivot.wtk.Component; import org.apache.pivot.wtk.Insets; import org.apache.pivot.wtk.Style; import org.apache.pivot.wtk.TableView; @@ -31,7 +28,7 @@ import org.apache.pivot.wtk.TextArea; */ public class TableViewTextAreaCellRenderer extends TextArea implements TableView.CellRenderer { public TableViewTextAreaCellRenderer() { - getStyles().put(Style.margin, new Insets(2)); + putStyle(Style.margin, new Insets(2)); } @Override @@ -57,27 +54,24 @@ public class TableViewTextAreaCellRender } protected void renderStyles(TableView tableView, boolean rowSelected, boolean rowDisabled) { - Component.StyleDictionary tableViewStyles = tableView.getStyles(); - Component.StyleDictionary styles = getStyles(); - - styles.copy(Style.font, tableViewStyles); + copyStyle(Style.font, tableView); - Color color; + Style colorStyle; if (tableView.isEnabled() && !rowDisabled) { if (rowSelected) { if (tableView.isFocused()) { - color = tableViewStyles.getColor(Style.selectionColor); + colorStyle = Style.selectionColor; } else { - color = tableViewStyles.getColor(Style.inactiveSelectionColor); + colorStyle = Style.inactiveSelectionColor; } } else { - color = tableViewStyles.getColor(Style.color); + colorStyle = Style.color; } } else { - color = tableViewStyles.getColor(Style.disabledColor); + colorStyle = Style.disabledColor; } - styles.put(Style.color, color); + putStyle(Style.color, tableView.getStyleColor(colorStyle)); } @Override Modified: pivot/trunk/wtk/src/org/apache/pivot/wtk/content/TreeViewNodeEditor.java URL: http://svn.apache.org/viewvc/pivot/trunk/wtk/src/org/apache/pivot/wtk/content/TreeViewNodeEditor.java?rev=1887555&r1=1887554&r2=1887555&view=diff ============================================================================== --- pivot/trunk/wtk/src/org/apache/pivot/wtk/content/TreeViewNodeEditor.java (original) +++ pivot/trunk/wtk/src/org/apache/pivot/wtk/content/TreeViewNodeEditor.java Fri Mar 12 22:59:15 2021 @@ -109,7 +109,7 @@ public class TreeViewNodeEditor extends Bounds textBounds = nodeRenderer.getTextBounds(); // Calculate the bounds of what is being edited - Insets padding = (Insets) textInput.getStyles().get(Style.padding); + Insets padding = (Insets) textInput.getStyle(Style.padding); Bounds editBounds = new Bounds(nodeBounds.x + textBounds.x - (padding.left + 1), nodeBounds.y, nodeBounds.width - textBounds.x + (padding.left + 1), nodeBounds.height); Modified: pivot/trunk/wtk/src/org/apache/pivot/wtk/content/TreeViewNodeRenderer.java URL: http://svn.apache.org/viewvc/pivot/trunk/wtk/src/org/apache/pivot/wtk/content/TreeViewNodeRenderer.java?rev=1887555&r1=1887554&r2=1887555&view=diff ============================================================================== --- pivot/trunk/wtk/src/org/apache/pivot/wtk/content/TreeViewNodeRenderer.java (original) +++ pivot/trunk/wtk/src/org/apache/pivot/wtk/content/TreeViewNodeRenderer.java Fri Mar 12 22:59:15 2021 @@ -16,7 +16,6 @@ */ package org.apache.pivot.wtk.content; -import java.awt.Color; import java.awt.Font; import org.apache.pivot.collections.Sequence.Tree.Path; @@ -46,8 +45,8 @@ public class TreeViewNodeRenderer extend public TreeViewNodeRenderer() { super(); - getStyles().put(Style.horizontalAlignment, HorizontalAlignment.LEFT); - getStyles().put(Style.verticalAlignment, VerticalAlignment.CENTER); + putStyle(Style.horizontalAlignment, HorizontalAlignment.LEFT); + putStyle(Style.verticalAlignment, VerticalAlignment.CENTER); add(imageView); add(label); @@ -92,7 +91,7 @@ public class TreeViewNodeRenderer extend // Update the image view imageView.setImage(icon); - imageView.getStyles().put(Style.opacity, (treeView.isEnabled() && !disabled) ? 1.0f : 0.5f); + imageView.putStyle(Style.opacity, (treeView.isEnabled() && !disabled) ? 1.0f : 0.5f); // Update the label label.setText(text != null ? text : ""); @@ -102,25 +101,25 @@ public class TreeViewNodeRenderer extend } else { label.setVisible(true); - Font font = treeView.getStyles().getFont(Style.font); - label.getStyles().put(Style.font, font); + Font font = treeView.getStyleFont(Style.font); + label.putStyle(Style.font, font); - Color color; + Style colorStyle; if (treeView.isEnabled() && !disabled) { if (selected) { if (treeView.isFocused()) { - color = treeView.getStyles().getColor(Style.selectionColor); + colorStyle = Style.selectionColor; } else { - color = treeView.getStyles().getColor(Style.inactiveSelectionColor); + colorStyle = Style.inactiveSelectionColor; } } else { - color = treeView.getStyles().getColor(Style.color); + colorStyle = Style.color; } } else { - color = treeView.getStyles().getColor(Style.disabledColor); + colorStyle = Style.disabledColor; } - label.getStyles().put(Style.color, color); + label.putStyle(Style.color, treeView.getStyleColor(colorStyle)); } } } @@ -174,11 +173,11 @@ public class TreeViewNodeRenderer extend } public boolean getFillIcon() { - return imageView.getStyles().getBoolean(Style.fill); + return imageView.getStyleBoolean(Style.fill); } public void setFillIcon(boolean fillIcon) { - imageView.getStyles().put(Style.fill, fillIcon); + imageView.putStyle(Style.fill, fillIcon); } /** Modified: pivot/trunk/wtk/src/org/apache/pivot/wtk/effects/WatermarkDecorator.java URL: http://svn.apache.org/viewvc/pivot/trunk/wtk/src/org/apache/pivot/wtk/effects/WatermarkDecorator.java?rev=1887555&r1=1887554&r2=1887555&view=diff ============================================================================== --- pivot/trunk/wtk/src/org/apache/pivot/wtk/effects/WatermarkDecorator.java (original) +++ pivot/trunk/wtk/src/org/apache/pivot/wtk/effects/WatermarkDecorator.java Fri Mar 12 22:59:15 2021 @@ -85,11 +85,11 @@ public class WatermarkDecorator implemen boxPane.add(imageView); boxPane.add(label); - boxPane.getStyles().put(Style.verticalAlignment, VerticalAlignment.CENTER); - imageView.getStyles().put(Style.opacity, opacity); + boxPane.putStyle(Style.verticalAlignment, VerticalAlignment.CENTER); + imageView.putStyle(Style.opacity, opacity); - Font font = label.getStyles().getFont(Style.font); - label.getStyles().put(Style.font, font.deriveFont(Font.BOLD, 60)); + Font font = label.getStyleFont(Style.font); + label.putStyle(Style.font, font.deriveFont(Font.BOLD, 60)); label.setText(text != null ? text : ""); imageView.setImage(image); @@ -122,7 +122,7 @@ public class WatermarkDecorator implemen * @return This decorator's font */ public Font getFont() { - return label.getStyles().getFont(Style.font); + return label.getStyleFont(Style.font); } /** @@ -133,7 +133,7 @@ public class WatermarkDecorator implemen public void setFont(Font font) { Utils.checkNull(font, "font"); - label.getStyles().put(Style.font, font); + label.putStyle(Style.font, font); validate(); } @@ -204,7 +204,7 @@ public class WatermarkDecorator implemen */ public void setOpacity(float opacity) { this.opacity = opacity; - imageView.getStyles().put(Style.opacity, opacity); + imageView.putStyle(Style.opacity, opacity); } /** Modified: pivot/trunk/wtk/src/org/apache/pivot/wtk/skin/ComponentSkin.java URL: http://svn.apache.org/viewvc/pivot/trunk/wtk/src/org/apache/pivot/wtk/skin/ComponentSkin.java?rev=1887555&r1=1887554&r2=1887555&view=diff ============================================================================== --- pivot/trunk/wtk/src/org/apache/pivot/wtk/skin/ComponentSkin.java (original) +++ pivot/trunk/wtk/src/org/apache/pivot/wtk/skin/ComponentSkin.java Fri Mar 12 22:59:15 2021 @@ -353,7 +353,7 @@ public abstract class ComponentSkin impl if (tooltipText != null) { Label tooltipLabel = new Label(tooltipText); boolean tooltipWrapText = component.getTooltipWrapText(); - tooltipLabel.getStyles().put(Style.wrapText, tooltipWrapText); + tooltipLabel.putStyle(Style.wrapText, tooltipWrapText); Tooltip tooltip = new Tooltip(tooltipLabel); Display display = component.getDisplay(); Modified: pivot/trunk/wtk/src/org/apache/pivot/wtk/skin/ScrollPaneSkin.java URL: http://svn.apache.org/viewvc/pivot/trunk/wtk/src/org/apache/pivot/wtk/skin/ScrollPaneSkin.java?rev=1887555&r1=1887554&r2=1887555&view=diff ============================================================================== --- pivot/trunk/wtk/src/org/apache/pivot/wtk/skin/ScrollPaneSkin.java (original) +++ pivot/trunk/wtk/src/org/apache/pivot/wtk/skin/ScrollPaneSkin.java Fri Mar 12 22:59:15 2021 @@ -759,7 +759,7 @@ public class ScrollPaneSkin extends Cont topLeftCorner.setVisible(true); topLeftCorner.setSize(rowHeaderWidth, columnHeaderHeight); topLeftCorner.setLocation(0, 0); - topLeftCorner.getStyles().put(Style.backgroundColor, backColor); + topLeftCorner.putStyle(Style.backgroundColor, backColor); } } else { if (corner != null) { @@ -773,7 +773,7 @@ public class ScrollPaneSkin extends Cont bottomLeftCorner.setVisible(true); bottomLeftCorner.setSize(rowHeaderWidth, horizontalScrollBarHeight); bottomLeftCorner.setLocation(0, height - horizontalScrollBarHeight); - bottomLeftCorner.getStyles().put(Style.backgroundColor, backColor); + bottomLeftCorner.putStyle(Style.backgroundColor, backColor); } else { bottomLeftCorner.setVisible(false); } @@ -783,7 +783,7 @@ public class ScrollPaneSkin extends Cont bottomRightCorner.setSize(verticalScrollBarWidth, horizontalScrollBarHeight); bottomRightCorner.setLocation(width - verticalScrollBarWidth, height - horizontalScrollBarHeight); - bottomRightCorner.getStyles().put(Style.backgroundColor, backColor); + bottomRightCorner.putStyle(Style.backgroundColor, backColor); } else { bottomRightCorner.setVisible(false); } @@ -792,7 +792,7 @@ public class ScrollPaneSkin extends Cont topRightCorner.setVisible(true); topRightCorner.setSize(verticalScrollBarWidth, columnHeaderHeight); topRightCorner.setLocation(width - verticalScrollBarWidth, 0); - topRightCorner.getStyles().put(Style.backgroundColor, backColor); + topRightCorner.putStyle(Style.backgroundColor, backColor); } else { topRightCorner.setVisible(false); }