Update the style.

@param c the component.
498286
private void updateStyle(JTable c) {
        SeaGlassContext context  = getContext(c, ENABLED);
        SynthStyle      oldStyle = style;

        SynthStyle s = SeaGlassLookAndFeel.updateStyle(context, this);
        if (s instanceof SeaGlassStyle) {
            style = (SeaGlassStyle) s;

            selectionActiveBottomBorderColor   = UIManager.getColor("seaGlassTableSelectionActiveBottom");
            selectionInactiveBottomBorderColor = UIManager.getColor("seaGlassTableSelectionInactiveBottom");
            transparentColor                   = UIManager.getColor("seaGlassTransparent");

            if (style != oldStyle) {
                table.remove(rendererPane);
                rendererPane = createCustomCellRendererPane();
                table.add(rendererPane);

                context.setComponentState(ENABLED | SELECTED);

                Color sbg = table.getSelectionBackground();

                if (sbg == null || sbg instanceof UIResource) {
                    table.setSelectionBackground(style.getColor(context, ColorType.TEXT_BACKGROUND));
                }

                Color sfg = table.getSelectionForeground();

                if (sfg == null || sfg instanceof UIResource) {
                    table.setSelectionForeground(style.getColor(context, ColorType.TEXT_FOREGROUND));
                }

                context.setComponentState(ENABLED);

                Color gridColor = table.getGridColor();

                if (gridColor == null || gridColor instanceof UIResource) {
                    gridColor = (Color) style.get(context, "Table.gridColor");
                    if (gridColor == null) {
                        gridColor = style.getColor(context, ColorType.FOREGROUND);
                    }

                    table.setGridColor(gridColor);
                }

                useTableColors = style.getBoolean(context, "Table.rendererUseTableColors", true);
                useUIBorder    = style.getBoolean(context, "Table.rendererUseUIBorder", true);

                Object rowHeight = style.get(context, "Table.rowHeight");

                if (rowHeight != null) {
                    LookAndFeel.installProperty(table, "rowHeight", rowHeight);
                }

                boolean showGrid = style.getBoolean(context, "Table.showGrid", true);

                if (!showGrid) {
                    table.setShowGrid(false);
                }

                Dimension d = table.getIntercellSpacing();
                // if (d == null || d instanceof UIResource) {
                if (d != null) {
                    d = (Dimension) style.get(context, "Table.intercellSpacing");
                }

                alternateColor = (Color) style.get(context, "Table.alternateRowColor");
                if (d != null) {
                    table.setIntercellSpacing(d);
                }

                table.setOpaque(false);

                if (alternateColor != null) {
                    table.setShowHorizontalLines(false);
                }

                // Make header column extend the width of the viewport (if there is
                // a viewport).
                table.getTableHeader().setBorder(createTableHeaderEmptyColumnPainter(table));
                setViewPortListeners(table);

                if (oldStyle != null) {
                    uninstallKeyboardActions();
                    installKeyboardActions();
                }
            }
        }
        
        context.dispose();
    }
414828
protected void updateLabelActiveStyle() {
        if (this.valueBoxBase.getText() != null && !this.valueBoxBase.getText().isEmpty()) {
            label.addStyleName(CssName.ACTIVE);
        } else {
            label.removeStyleName(CssName.ACTIVE);
        }
    }
695819
private void updateStyle() {
        CaptionStyle cs = captionStyle == null ? CaptionStyle.HIDDEN : captionStyle;
        String background = null;
        
        switch (cs) {
            case FRAME:
                break;
            
            case TITLE:
                break;
            
            case LEFT:
                background = getGradValue(color1, color2);
                break;
            
            case RIGHT:
                background = getGradValue(color2, color1);
                break;
            
            case CENTER:
                background = getGradValue(color1, color2, color1);
                break;
            
        }
        
        panel.addClass("sharedForms-captioned sharedForms-captioned-caption-" + cs.name().toLowerCase());
        String css = "##{id}-titlebar ";
        
        if (cs == CaptionStyle.HIDDEN) {
            css += "{display:none}";
        } else {
            css += "{background: " + background + "}";
        }
        
        panel.setCss(css);
    }
147131
private void style(View view, int value) {
        view.setScaleX(value);
        view.setScaleY(value);
        view.setAlpha(value);
    }
608166
public void setValue(String newStyle) {

        for (UIObject ui : m_uis) {
            if (m_style != null) {
                ui.removeStyleName(m_style);
            }
            if (newStyle != null) {
                ui.addStyleName(newStyle);
            }
        }
        m_style = newStyle;
    }
852962
private void setTextColor() {
        if (isWeakReferenceValid()) {
            TextView textView = getTextView().get();
            textView.setTextColor(getTextColor(textView.getContext()));
        }
    }
1029424
public void updateEditorMode() {

        CmsClientSitemapEntry entry = getSitemapEntry();
        getListItemWidget().setIcon(CmsSitemapView.getInstance().getIconForEntry(entry));
        setAdditionalStyles(entry, getListItemWidget());
        for (Widget child : m_children) {
            if (child instanceof CmsSitemapTreeItem) {
                ((CmsSitemapTreeItem)child).updateEditorMode();
            }
        }
    }
483566
protected void updateStyles() {
        DayEntryView view = getSkinnable();
        Entry<?> entry = getEntry();

        Calendar calendar = entry.getCalendar();
        if (entry instanceof DraggedEntry) {
            calendar = ((DraggedEntry) entry).getOriginalCalendar();
        }

        // when the entry gets removed from its calendar then the calendar can
        // be null
        if (calendar == null) {
            return;
        }

        view.getStyleClass().setAll("default-style-entry",
                calendar.getStyle() + "-entry");

        if (entry.isRecurrence()) {
            view.getStyleClass().add("recurrence"); //$NON-NLS-1$
        }

        startTimeLabel.getStyleClass().setAll("start-time-label",
                "default-style-entry-time-label",
                calendar.getStyle() + "-entry-time-label");
        titleLabel.getStyleClass().setAll("title-label",
                "default-style-entry-title-label",
                calendar.getStyle() + "-entry-title-label");
    }
614496
private void updateStyle(JSeparator sep) {
        SeaGlassContext context  = getContext(sep, ENABLED);
        SynthStyle      oldStyle = style;

        style = SeaGlassLookAndFeel.updateStyle(context, this);

        if (style != oldStyle) {
            if (sep instanceof JToolBar.Separator) {
                Dimension size = ((JToolBar.Separator) sep).getSeparatorSize();

                if (size == null || size instanceof UIResource) {
                    size = (DimensionUIResource) style.get(context, "ToolBar.separatorSize");
                    if (true || size == null) {
                        size = new DimensionUIResource(10, 10);
                    }

                    ((JToolBar.Separator) sep).setSeparatorSize(size);
                }
            }
        }

        context.dispose();
    }
109673
public void setKnobStyle(final KnobStyle KNOB_STYLE) {
        getModel().setKnobStyle(KNOB_STYLE);
        init(getInnerBounds().width, getInnerBounds().height);
        repaint(getInnerBounds());
    }
747656
public void updateSelection(Color color) {
        setFocusedSquare(null);

        for (ColorSquare c : colorPickerGrid.getSquares()) {
            if (c.rectangle.getFill().equals(color)) {
                setFocusedSquare(c);
                return;
            }
        }
        // check custom colors
        for (Node n : customColorGrid.getChildren()) {
            ColorSquare c = (ColorSquare) n;
            if (c.rectangle.getFill().equals(color)) {
                setFocusedSquare(c);
                return;
            }
        }
    }
280988
private void updateDecoration() {
        if (lastResult != null) {
            if (lastResult) {
                setIcon(validIcon);
                setToolTipText(validText);
            } else {
                setIcon(invalidIcon);
                setToolTipText(invalidText);
            }
        }
    }
945629
public void add(Color c) {
		r += c.r;
		g += c.g;
		b += c.b;
		a += c.a;
	}
1103261
public void setSize(I_CmsButton.Size size) {

        if (m_size != null) {
            removeStyleName(m_size.getCssClassName());
        }
        if (size != null) {
            addStyleName(size.getCssClassName());
        }
        m_size = size;
    }
200360
@Override
  protected void updateStyle(PseudoClass pseudo, boolean newValue) {
    if (node != null) {
      node.pseudoClassStateChanged(pseudo, newValue);
    }
    if (fieldLabel != null) {
      fieldLabel.pseudoClassStateChanged(pseudo, newValue);
    }
  }
798184
private void updateSearchStyle(JTextComponent c, SeaGlassContext context, String prefix) {
        searchIconWidth = 0;
        Object o = style.get(context, prefix + ".searchIconWidth");

        if (o != null && o instanceof Integer) {
            searchIconWidth = (Integer) o;
        }

        popupIconWidth = 0;
        o              = style.get(context, prefix + ".popupIconWidth");
        if (o != null && o instanceof Integer) {
            popupIconWidth = (Integer) o;
        }

        cancelIconWidth = 0;
        o               = style.get(context, prefix + ".cancelIconWidth");
        if (o != null && o instanceof Integer) {
            cancelIconWidth = (Integer) o;
        }

        searchLeftInnerMargin = 0;
        o                     = style.get(context, prefix + ".searchLeftInnerMargin");
        if (o != null && o instanceof Integer) {
            searchLeftInnerMargin = (Integer) o;
        }

        searchRightInnerMargin = 0;
        o                      = style.get(context, prefix + ".searchRightInnerMargin");
        if (o != null && o instanceof Integer) {
            searchRightInnerMargin = (Integer) o;
        }

        placeholderColor = Color.GRAY;
        o                = style.get(context, "placeholderTextColor");
        if (o != null && o instanceof Color) {
            placeholderColor = (Color) o;
        }

        Border border = c.getBorder();

        if (border == null || border instanceof UIResource && !(border instanceof TextFieldBorder)) {
            c.setBorder(createTextFieldBorder(context));
        }

        if (isSearchField.isInState(c)) {
            o = c.getClientProperty("JTextField.Search.PlaceholderText");
            if (o != null && o instanceof String) {
                placeholderText = (String) o;
            } else if (placeholderText != null) {
                placeholderText = null;
            }

            o = c.getClientProperty("JTextField.Search.FindAction");
            if (o != null && o instanceof ActionListener) {
                if (findAction == null) {
                    findAction = (ActionListener) o;
                }
            }

            o = c.getClientProperty("JTextField.Search.FindPopup");
            if (o != null && o instanceof JPopupMenu) {
                if (findPopup == null) {
                    findPopup = (JPopupMenu) o;
                }
            }

            o = c.getClientProperty("JTextField.Search.CancelAction");
            if (o != null && o instanceof ActionListener) {
                if (cancelAction == null) {
                    cancelAction = (ActionListener) o;
                }
            }

            installMouseListeners();
        } else {
            placeholderText = null;

            if (findAction != null) {
                findAction = null;
            }

            if (findPopup != null) {
                findPopup = null;
            }

            if (cancelAction != null) {
                cancelAction = null;
            }

            uninstallMouseListeners();
        }
    }
371101
public void setTextColor(final Color COLOR) {
        if (null == textColor) {
            _textColor = COLOR;
            fireUpdateEvent(REDRAW_EVENT);
        } else {
            textColor.set(COLOR);
        }
    }