public Icon getIcon(SynthContext context, Object key) { return style.getIcon(context, key); }
/** * DOCUMENT ME! * * @param b DOCUMENT ME! * @param synthConstant DOCUMENT ME! * * @return DOCUMENT ME! */ private Icon getSynthIcon(AbstractButton b, int synthConstant) { return style.getIcon(getContext(b, synthConstant), getPropertyPrefix() + "icon"); }
/** * Paints the specified component. This implementation does nothing. * * @param context * context for the component being painted * @param g * the {@code Graphics} object used for painting * @see #update(Graphics,JComponent) */ protected void paint(SynthContext context, Graphics g) { SeaGlassContext accContext = getContext(menuItem, Region.MENU_ITEM_ACCELERATOR); // Refetch the appropriate check indicator for the current state String prefix = getPropertyPrefix(); Icon checkIcon = style.getIcon(context, prefix + ".checkIcon"); Icon arrowIcon = style.getIcon(context, prefix + ".arrowIcon"); SeaGlassGraphicsUtils.paint(context, accContext, g, checkIcon, arrowIcon, acceleratorDelimiter, defaultTextIconGap, getPropertyPrefix()); accContext.dispose(); }
/** * Returns the default icon. This should NOT callback to the JComponent. * * @param b AbstractButton the iocn is associated with. * * @return the default icon. */ protected Icon getDefaultIcon(AbstractButton b) { SeaGlassContext context = getContext(b); Icon icon = context.getStyle().getIcon(context, getPropertyPrefix() + "icon"); context.dispose(); return icon; }
protected void paint(SeaGlassContext context, Graphics g) { SeaGlassContext accContext = getContext(menuItem, Region.MENU_ITEM_ACCELERATOR); String prefix = getPropertyPrefix(); Icon arIcon = style.getIcon( getContext(context.getComponent()), prefix + ".arrowIcon"); paint(context, accContext, g, style.getIcon(getContext(context.getComponent()), prefix + ".checkIcon"), arIcon, true, acceleratorDelimiter, defaultTextIconGap); accContext.dispose(); }
private void updateStyle(JComponent c) { SeaGlassContext context = getContext(c, ENABLED); SynthStyle oldStyle = style; style = SeaGlassLookAndFeel.updateStyle(context, this); if (style != oldStyle) { Icon frameIcon = frame.getFrameIcon(); if (frameIcon == null || frameIcon instanceof UIResource) { frame.setFrameIcon(context.getStyle().getIcon(context, "InternalFrame.icon")); } if (oldStyle != null) { uninstallKeyboardActions(); installKeyboardActions(); } } context.dispose(); }
return style.getIcon(context, key);
private void updateStyle(JToolBar c) { SeaGlassContext context = getContext(c, Region.TOOL_BAR_CONTENT, null, ENABLED); contentStyle = SeaGlassLookAndFeel.updateStyle(context, this); context.getComponent().setOpaque(false); context.dispose(); context = getContext(c, Region.TOOL_BAR_DRAG_WINDOW, null, ENABLED); context.getComponent().setOpaque(false); dragWindowStyle = SeaGlassLookAndFeel.updateStyle(context, this); context.dispose(); context = getContext(c, ENABLED); context.getComponent().setOpaque(false); SynthStyle oldStyle = style; style = SeaGlassLookAndFeel.updateStyle(context, this); if (oldStyle != style) { handleIcon = style.getIcon(context, "ToolBar.handleIcon"); if (oldStyle != null) { uninstallKeyboardActions(); installKeyboardActions(); } } context.dispose(); }