提交 278ccc04 编写于 作者: P peterz

6912118: Incosistency in several SynthUI classes between inherited specs...

6912118: Incosistency in several SynthUI classes between inherited specs ofupdate() and paint() methods
Reviewed-by: rupashka
上级 2cf3d9a6
...@@ -237,7 +237,16 @@ public class SynthButtonUI extends BasicButtonUI implements ...@@ -237,7 +237,16 @@ public class SynthButtonUI extends BasicButtonUI implements
// ******************************** // ********************************
/** /**
* @inheritDoc * Notifies this UI delegate to repaint the specified component.
* This method paints the component background, then calls
* the {@link #paint(SynthContext,Graphics)} method.
*
* <p>In general, this method does not need to be overridden by subclasses.
* All Look and Feel rendering code should reside in the {@code paint} method.
*
* @param g the {@code Graphics} object used for painting
* @param c the component being painted
* @see #paint(SynthContext,Graphics)
*/ */
@Override @Override
public void update(Graphics g, JComponent c) { public void update(Graphics g, JComponent c) {
...@@ -250,7 +259,13 @@ public class SynthButtonUI extends BasicButtonUI implements ...@@ -250,7 +259,13 @@ public class SynthButtonUI extends BasicButtonUI implements
} }
/** /**
* @inheritDoc * Paints the specified component according to the Look and Feel.
* <p>This method is not used by Synth Look and Feel.
* Painting is handled by the {@link #paint(SynthContext,Graphics)} method.
*
* @param g the {@code Graphics} object used for painting
* @param c the component being painted
* @see #paint(SynthContext,Graphics)
*/ */
@Override @Override
public void paint(Graphics g, JComponent c) { public void paint(Graphics g, JComponent c) {
...@@ -264,7 +279,8 @@ public class SynthButtonUI extends BasicButtonUI implements ...@@ -264,7 +279,8 @@ public class SynthButtonUI extends BasicButtonUI implements
* Paints the specified component. * Paints the specified component.
* *
* @param context context for the component being painted * @param context context for the component being painted
* @param g {@code Graphics} object used for painting * @param g the {@code Graphics} object used for painting
* @see #update(Graphics,JComponent)
*/ */
protected void paint(SynthContext context, Graphics g) { protected void paint(SynthContext context, Graphics g) {
AbstractButton b = (AbstractButton)context.getComponent(); AbstractButton b = (AbstractButton)context.getComponent();
......
...@@ -137,7 +137,16 @@ public class SynthColorChooserUI extends BasicColorChooserUI implements ...@@ -137,7 +137,16 @@ public class SynthColorChooserUI extends BasicColorChooserUI implements
} }
/** /**
* @inheritDoc * Notifies this UI delegate to repaint the specified component.
* This method paints the component background, then calls
* the {@link #paint(SynthContext,Graphics)} method.
*
* <p>In general, this method does not need to be overridden by subclasses.
* All Look and Feel rendering code should reside in the {@code paint} method.
*
* @param g the {@code Graphics} object used for painting
* @param c the component being painted
* @see #paint(SynthContext,Graphics)
*/ */
@Override @Override
public void update(Graphics g, JComponent c) { public void update(Graphics g, JComponent c) {
...@@ -151,7 +160,13 @@ public class SynthColorChooserUI extends BasicColorChooserUI implements ...@@ -151,7 +160,13 @@ public class SynthColorChooserUI extends BasicColorChooserUI implements
} }
/** /**
* @inheritDoc * Paints the specified component according to the Look and Feel.
* <p>This method is not used by Synth Look and Feel.
* Painting is handled by the {@link #paint(SynthContext,Graphics)} method.
*
* @param g the {@code Graphics} object used for painting
* @param c the component being painted
* @see #paint(SynthContext,Graphics)
*/ */
@Override @Override
public void paint(Graphics g, JComponent c) { public void paint(Graphics g, JComponent c) {
...@@ -166,7 +181,8 @@ public class SynthColorChooserUI extends BasicColorChooserUI implements ...@@ -166,7 +181,8 @@ public class SynthColorChooserUI extends BasicColorChooserUI implements
* This implementation does not perform any actions. * This implementation does not perform any actions.
* *
* @param context context for the component being painted * @param context context for the component being painted
* @param g {@code Graphics} object used for painting * @param g the {@code Graphics} object used for painting
* @see #update(Graphics,JComponent)
*/ */
protected void paint(SynthContext context, Graphics g) { protected void paint(SynthContext context, Graphics g) {
} }
......
...@@ -305,7 +305,16 @@ public class SynthComboBoxUI extends BasicComboBoxUI implements ...@@ -305,7 +305,16 @@ public class SynthComboBoxUI extends BasicComboBoxUI implements
// begin ComponentUI Implementation // begin ComponentUI Implementation
/** /**
* @inheritDoc * Notifies this UI delegate to repaint the specified component.
* This method paints the component background, then calls
* the {@link #paint(SynthContext,Graphics)} method.
*
* <p>In general, this method does not need to be overridden by subclasses.
* All Look and Feel rendering code should reside in the {@code paint} method.
*
* @param g the {@code Graphics} object used for painting
* @param c the component being painted
* @see #paint(SynthContext,Graphics)
*/ */
@Override @Override
public void update(Graphics g, JComponent c) { public void update(Graphics g, JComponent c) {
...@@ -319,7 +328,13 @@ public class SynthComboBoxUI extends BasicComboBoxUI implements ...@@ -319,7 +328,13 @@ public class SynthComboBoxUI extends BasicComboBoxUI implements
} }
/** /**
* @inheritDoc * Paints the specified component according to the Look and Feel.
* <p>This method is not used by Synth Look and Feel.
* Painting is handled by the {@link #paint(SynthContext,Graphics)} method.
*
* @param g the {@code Graphics} object used for painting
* @param c the component being painted
* @see #paint(SynthContext,Graphics)
*/ */
@Override @Override
public void paint(Graphics g, JComponent c) { public void paint(Graphics g, JComponent c) {
...@@ -333,7 +348,8 @@ public class SynthComboBoxUI extends BasicComboBoxUI implements ...@@ -333,7 +348,8 @@ public class SynthComboBoxUI extends BasicComboBoxUI implements
* Paints the specified component. * Paints the specified component.
* *
* @param context context for the component being painted * @param context context for the component being painted
* @param g {@code Graphics} object used for painting * @param g the {@code Graphics} object used for painting
* @see #update(Graphics,JComponent)
*/ */
protected void paint(SynthContext context, Graphics g) { protected void paint(SynthContext context, Graphics g) {
hasFocus = comboBox.hasFocus(); hasFocus = comboBox.hasFocus();
......
...@@ -152,7 +152,16 @@ public class SynthDesktopIconUI extends BasicDesktopIconUI ...@@ -152,7 +152,16 @@ public class SynthDesktopIconUI extends BasicDesktopIconUI
} }
/** /**
* @inheritDoc * Notifies this UI delegate to repaint the specified component.
* This method paints the component background, then calls
* the {@link #paint(SynthContext,Graphics)} method.
*
* <p>In general, this method does not need to be overridden by subclasses.
* All Look and Feel rendering code should reside in the {@code paint} method.
*
* @param g the {@code Graphics} object used for painting
* @param c the component being painted
* @see #paint(SynthContext,Graphics)
*/ */
@Override @Override
public void update(Graphics g, JComponent c) { public void update(Graphics g, JComponent c) {
...@@ -166,7 +175,13 @@ public class SynthDesktopIconUI extends BasicDesktopIconUI ...@@ -166,7 +175,13 @@ public class SynthDesktopIconUI extends BasicDesktopIconUI
} }
/** /**
* @inheritDoc * Paints the specified component according to the Look and Feel.
* <p>This method is not used by Synth Look and Feel.
* Painting is handled by the {@link #paint(SynthContext,Graphics)} method.
*
* @param g the {@code Graphics} object used for painting
* @param c the component being painted
* @see #paint(SynthContext,Graphics)
*/ */
@Override @Override
public void paint(Graphics g, JComponent c) { public void paint(Graphics g, JComponent c) {
...@@ -180,7 +195,8 @@ public class SynthDesktopIconUI extends BasicDesktopIconUI ...@@ -180,7 +195,8 @@ public class SynthDesktopIconUI extends BasicDesktopIconUI
* Paints the specified component. This implementation does nothing. * Paints the specified component. This implementation does nothing.
* *
* @param context context for the component being painted * @param context context for the component being painted
* @param g {@code Graphics} object used for painting * @param g the {@code Graphics} object used for painting
* @see #update(Graphics,JComponent)
*/ */
protected void paint(SynthContext context, Graphics g) { protected void paint(SynthContext context, Graphics g) {
} }
......
...@@ -439,7 +439,16 @@ public class SynthDesktopPaneUI extends BasicDesktopPaneUI implements ...@@ -439,7 +439,16 @@ public class SynthDesktopPaneUI extends BasicDesktopPaneUI implements
} }
/** /**
* @inheritDoc * Notifies this UI delegate to repaint the specified component.
* This method paints the component background, then calls
* the {@link #paint(SynthContext,Graphics)} method.
*
* <p>In general, this method does not need to be overridden by subclasses.
* All Look and Feel rendering code should reside in the {@code paint} method.
*
* @param g the {@code Graphics} object used for painting
* @param c the component being painted
* @see #paint(SynthContext,Graphics)
*/ */
@Override @Override
public void update(Graphics g, JComponent c) { public void update(Graphics g, JComponent c) {
...@@ -453,7 +462,13 @@ public class SynthDesktopPaneUI extends BasicDesktopPaneUI implements ...@@ -453,7 +462,13 @@ public class SynthDesktopPaneUI extends BasicDesktopPaneUI implements
} }
/** /**
* @inheritDoc * Paints the specified component according to the Look and Feel.
* <p>This method is not used by Synth Look and Feel.
* Painting is handled by the {@link #paint(SynthContext,Graphics)} method.
*
* @param g the {@code Graphics} object used for painting
* @param c the component being painted
* @see #paint(SynthContext,Graphics)
*/ */
@Override @Override
public void paint(Graphics g, JComponent c) { public void paint(Graphics g, JComponent c) {
...@@ -467,7 +482,8 @@ public class SynthDesktopPaneUI extends BasicDesktopPaneUI implements ...@@ -467,7 +482,8 @@ public class SynthDesktopPaneUI extends BasicDesktopPaneUI implements
* Paints the specified component. This implementation does nothing. * Paints the specified component. This implementation does nothing.
* *
* @param context context for the component being painted * @param context context for the component being painted
* @param g {@code Graphics} object used for painting * @param g the {@code Graphics} object used for painting
* @see #update(Graphics,JComponent)
*/ */
protected void paint(SynthContext context, Graphics g) { protected void paint(SynthContext context, Graphics g) {
} }
......
...@@ -148,7 +148,16 @@ public class SynthEditorPaneUI extends BasicEditorPaneUI implements SynthUI { ...@@ -148,7 +148,16 @@ public class SynthEditorPaneUI extends BasicEditorPaneUI implements SynthUI {
} }
/** /**
* @inheritDoc * Notifies this UI delegate to repaint the specified component.
* This method paints the component background, then calls
* the {@link #paint(SynthContext,Graphics)} method.
*
* <p>In general, this method does not need to be overridden by subclasses.
* All Look and Feel rendering code should reside in the {@code paint} method.
*
* @param g the {@code Graphics} object used for painting
* @param c the component being painted
* @see #paint(SynthContext,Graphics)
*/ */
@Override @Override
public void update(Graphics g, JComponent c) { public void update(Graphics g, JComponent c) {
...@@ -164,7 +173,8 @@ public class SynthEditorPaneUI extends BasicEditorPaneUI implements SynthUI { ...@@ -164,7 +173,8 @@ public class SynthEditorPaneUI extends BasicEditorPaneUI implements SynthUI {
* Paints the specified component. * Paints the specified component.
* *
* @param context context for the component being painted * @param context context for the component being painted
* @param g {@code Graphics} object used for painting * @param g the {@code Graphics} object used for painting
* @see #update(Graphics,JComponent)
*/ */
protected void paint(SynthContext context, Graphics g) { protected void paint(SynthContext context, Graphics g) {
super.paint(g, getComponent()); super.paint(g, getComponent());
......
...@@ -194,7 +194,16 @@ public class SynthInternalFrameUI extends BasicInternalFrameUI ...@@ -194,7 +194,16 @@ public class SynthInternalFrameUI extends BasicInternalFrameUI
} }
/** /**
* @inheritDoc * Notifies this UI delegate to repaint the specified component.
* This method paints the component background, then calls
* the {@link #paint(SynthContext,Graphics)} method.
*
* <p>In general, this method does not need to be overridden by subclasses.
* All Look and Feel rendering code should reside in the {@code paint} method.
*
* @param g the {@code Graphics} object used for painting
* @param c the component being painted
* @see #paint(SynthContext,Graphics)
*/ */
@Override @Override
public void update(Graphics g, JComponent c) { public void update(Graphics g, JComponent c) {
...@@ -208,7 +217,13 @@ public class SynthInternalFrameUI extends BasicInternalFrameUI ...@@ -208,7 +217,13 @@ public class SynthInternalFrameUI extends BasicInternalFrameUI
} }
/** /**
* @inheritDoc * Paints the specified component according to the Look and Feel.
* <p>This method is not used by Synth Look and Feel.
* Painting is handled by the {@link #paint(SynthContext,Graphics)} method.
*
* @param g the {@code Graphics} object used for painting
* @param c the component being painted
* @see #paint(SynthContext,Graphics)
*/ */
@Override @Override
public void paint(Graphics g, JComponent c) { public void paint(Graphics g, JComponent c) {
...@@ -222,7 +237,8 @@ public class SynthInternalFrameUI extends BasicInternalFrameUI ...@@ -222,7 +237,8 @@ public class SynthInternalFrameUI extends BasicInternalFrameUI
* Paints the specified component. This implementation does nothing. * Paints the specified component. This implementation does nothing.
* *
* @param context context for the component being painted * @param context context for the component being painted
* @param g {@code Graphics} object used for painting * @param g the {@code Graphics} object used for painting
* @see #update(Graphics,JComponent)
*/ */
protected void paint(SynthContext context, Graphics g) { protected void paint(SynthContext context, Graphics g) {
} }
......
...@@ -156,12 +156,16 @@ public class SynthLabelUI extends BasicLabelUI implements SynthUI { ...@@ -156,12 +156,16 @@ public class SynthLabelUI extends BasicLabelUI implements SynthUI {
} }
/** /**
* Notifies this UI delegate that it's time to paint the specified * Notifies this UI delegate to repaint the specified component.
* component. This method is invoked by <code>JComponent</code> * This method paints the component background, then calls
* when the specified component is being painted. * the {@link #paint(SynthContext,Graphics)} method.
*/ *
/** * <p>In general, this method does not need to be overridden by subclasses.
* @inheritDoc * All Look and Feel rendering code should reside in the {@code paint} method.
*
* @param g the {@code Graphics} object used for painting
* @param c the component being painted
* @see #paint(SynthContext,Graphics)
*/ */
@Override @Override
public void update(Graphics g, JComponent c) { public void update(Graphics g, JComponent c) {
...@@ -175,7 +179,13 @@ public class SynthLabelUI extends BasicLabelUI implements SynthUI { ...@@ -175,7 +179,13 @@ public class SynthLabelUI extends BasicLabelUI implements SynthUI {
} }
/** /**
* @inheritDoc * Paints the specified component according to the Look and Feel.
* <p>This method is not used by Synth Look and Feel.
* Painting is handled by the {@link #paint(SynthContext,Graphics)} method.
*
* @param g the {@code Graphics} object used for painting
* @param c the component being painted
* @see #paint(SynthContext,Graphics)
*/ */
@Override @Override
public void paint(Graphics g, JComponent c) { public void paint(Graphics g, JComponent c) {
...@@ -189,7 +199,8 @@ public class SynthLabelUI extends BasicLabelUI implements SynthUI { ...@@ -189,7 +199,8 @@ public class SynthLabelUI extends BasicLabelUI implements SynthUI {
* Paints the specified component. * Paints the specified component.
* *
* @param context context for the component being painted * @param context context for the component being painted
* @param g {@code Graphics} object used for painting * @param g the {@code Graphics} object used for painting
* @see #update(Graphics,JComponent)
*/ */
protected void paint(SynthContext context, Graphics g) { protected void paint(SynthContext context, Graphics g) {
JLabel label = (JLabel)context.getComponent(); JLabel label = (JLabel)context.getComponent();
......
...@@ -57,7 +57,16 @@ public class SynthListUI extends BasicListUI ...@@ -57,7 +57,16 @@ public class SynthListUI extends BasicListUI
} }
/** /**
* @inheritDoc * Notifies this UI delegate to repaint the specified component.
* This method paints the component background, then calls
* the {@link #paint} method.
*
* <p>In general, this method does not need to be overridden by subclasses.
* All Look and Feel rendering code should reside in the {@code paint} method.
*
* @param g the {@code Graphics} object used for painting
* @param c the component being painted
* @see #paint
*/ */
@Override @Override
public void update(Graphics g, JComponent c) { public void update(Graphics g, JComponent c) {
......
...@@ -125,7 +125,16 @@ public class SynthMenuBarUI extends BasicMenuBarUI ...@@ -125,7 +125,16 @@ public class SynthMenuBarUI extends BasicMenuBarUI
} }
/** /**
* @inheritDoc * Notifies this UI delegate to repaint the specified component.
* This method paints the component background, then calls
* the {@link #paint(SynthContext,Graphics)} method.
*
* <p>In general, this method does not need to be overridden by subclasses.
* All Look and Feel rendering code should reside in the {@code paint} method.
*
* @param g the {@code Graphics} object used for painting
* @param c the component being painted
* @see #paint(SynthContext,Graphics)
*/ */
@Override @Override
public void update(Graphics g, JComponent c) { public void update(Graphics g, JComponent c) {
...@@ -139,7 +148,13 @@ public class SynthMenuBarUI extends BasicMenuBarUI ...@@ -139,7 +148,13 @@ public class SynthMenuBarUI extends BasicMenuBarUI
} }
/** /**
* @inheritDoc * Paints the specified component according to the Look and Feel.
* <p>This method is not used by Synth Look and Feel.
* Painting is handled by the {@link #paint(SynthContext,Graphics)} method.
*
* @param g the {@code Graphics} object used for painting
* @param c the component being painted
* @see #paint(SynthContext,Graphics)
*/ */
@Override @Override
public void paint(Graphics g, JComponent c) { public void paint(Graphics g, JComponent c) {
...@@ -153,7 +168,8 @@ public class SynthMenuBarUI extends BasicMenuBarUI ...@@ -153,7 +168,8 @@ public class SynthMenuBarUI extends BasicMenuBarUI
* Paints the specified component. This implementation does nothing. * Paints the specified component. This implementation does nothing.
* *
* @param context context for the component being painted * @param context context for the component being painted
* @param g {@code Graphics} object used for painting * @param g the {@code Graphics} object used for painting
* @see #update(Graphics,JComponent)
*/ */
protected void paint(SynthContext context, Graphics g) { protected void paint(SynthContext context, Graphics g) {
} }
......
...@@ -227,7 +227,16 @@ public class SynthMenuItemUI extends BasicMenuItemUI implements ...@@ -227,7 +227,16 @@ public class SynthMenuItemUI extends BasicMenuItemUI implements
/** /**
* @inheritDoc * Notifies this UI delegate to repaint the specified component.
* This method paints the component background, then calls
* the {@link #paint(SynthContext,Graphics)} method.
*
* <p>In general, this method does not need to be overridden by subclasses.
* All Look and Feel rendering code should reside in the {@code paint} method.
*
* @param g the {@code Graphics} object used for painting
* @param c the component being painted
* @see #paint(SynthContext,Graphics)
*/ */
@Override @Override
public void update(Graphics g, JComponent c) { public void update(Graphics g, JComponent c) {
...@@ -240,7 +249,13 @@ public class SynthMenuItemUI extends BasicMenuItemUI implements ...@@ -240,7 +249,13 @@ public class SynthMenuItemUI extends BasicMenuItemUI implements
} }
/** /**
* @inheritDoc * Paints the specified component according to the Look and Feel.
* <p>This method is not used by Synth Look and Feel.
* Painting is handled by the {@link #paint(SynthContext,Graphics)} method.
*
* @param g the {@code Graphics} object used for painting
* @param c the component being painted
* @see #paint(SynthContext,Graphics)
*/ */
@Override @Override
public void paint(Graphics g, JComponent c) { public void paint(Graphics g, JComponent c) {
...@@ -254,7 +269,8 @@ public class SynthMenuItemUI extends BasicMenuItemUI implements ...@@ -254,7 +269,8 @@ public class SynthMenuItemUI extends BasicMenuItemUI implements
* Paints the specified component. * Paints the specified component.
* *
* @param context context for the component being painted * @param context context for the component being painted
* @param g {@code Graphics} object used for painting * @param g the {@code Graphics} object used for painting
* @see #update(Graphics,JComponent)
*/ */
protected void paint(SynthContext context, Graphics g) { protected void paint(SynthContext context, Graphics g) {
SynthContext accContext = getContext(menuItem, SynthContext accContext = getContext(menuItem,
......
...@@ -227,7 +227,16 @@ public class SynthMenuUI extends BasicMenuUI ...@@ -227,7 +227,16 @@ public class SynthMenuUI extends BasicMenuUI
} }
/** /**
* @inheritDoc * Notifies this UI delegate to repaint the specified component.
* This method paints the component background, then calls
* the {@link #paint(SynthContext,Graphics)} method.
*
* <p>In general, this method does not need to be overridden by subclasses.
* All Look and Feel rendering code should reside in the {@code paint} method.
*
* @param g the {@code Graphics} object used for painting
* @param c the component being painted
* @see #paint(SynthContext,Graphics)
*/ */
@Override @Override
public void update(Graphics g, JComponent c) { public void update(Graphics g, JComponent c) {
...@@ -241,7 +250,13 @@ public class SynthMenuUI extends BasicMenuUI ...@@ -241,7 +250,13 @@ public class SynthMenuUI extends BasicMenuUI
} }
/** /**
* @inheritDoc * Paints the specified component according to the Look and Feel.
* <p>This method is not used by Synth Look and Feel.
* Painting is handled by the {@link #paint(SynthContext,Graphics)} method.
*
* @param g the {@code Graphics} object used for painting
* @param c the component being painted
* @see #paint(SynthContext,Graphics)
*/ */
@Override @Override
public void paint(Graphics g, JComponent c) { public void paint(Graphics g, JComponent c) {
...@@ -255,7 +270,8 @@ public class SynthMenuUI extends BasicMenuUI ...@@ -255,7 +270,8 @@ public class SynthMenuUI extends BasicMenuUI
* Paints the specified component. This implementation does nothing. * Paints the specified component. This implementation does nothing.
* *
* @param context context for the component being painted * @param context context for the component being painted
* @param g {@code Graphics} object used for painting * @param g the {@code Graphics} object used for painting
* @see #update(Graphics,JComponent)
*/ */
protected void paint(SynthContext context, Graphics g) { protected void paint(SynthContext context, Graphics g) {
SynthContext accContext = getContext(menuItem, SynthContext accContext = getContext(menuItem,
......
...@@ -149,7 +149,16 @@ public class SynthOptionPaneUI extends BasicOptionPaneUI implements ...@@ -149,7 +149,16 @@ public class SynthOptionPaneUI extends BasicOptionPaneUI implements
} }
/** /**
* @inheritDoc * Notifies this UI delegate to repaint the specified component.
* This method paints the component background, then calls
* the {@link #paint(SynthContext,Graphics)} method.
*
* <p>In general, this method does not need to be overridden by subclasses.
* All Look and Feel rendering code should reside in the {@code paint} method.
*
* @param g the {@code Graphics} object used for painting
* @param c the component being painted
* @see #paint(SynthContext,Graphics)
*/ */
@Override @Override
public void update(Graphics g, JComponent c) { public void update(Graphics g, JComponent c) {
...@@ -163,7 +172,13 @@ public class SynthOptionPaneUI extends BasicOptionPaneUI implements ...@@ -163,7 +172,13 @@ public class SynthOptionPaneUI extends BasicOptionPaneUI implements
} }
/** /**
* @inheritDoc * Paints the specified component according to the Look and Feel.
* <p>This method is not used by Synth Look and Feel.
* Painting is handled by the {@link #paint(SynthContext,Graphics)} method.
*
* @param g the {@code Graphics} object used for painting
* @param c the component being painted
* @see #paint(SynthContext,Graphics)
*/ */
@Override @Override
public void paint(Graphics g, JComponent c) { public void paint(Graphics g, JComponent c) {
...@@ -177,7 +192,8 @@ public class SynthOptionPaneUI extends BasicOptionPaneUI implements ...@@ -177,7 +192,8 @@ public class SynthOptionPaneUI extends BasicOptionPaneUI implements
* Paints the specified component. This implementation does nothing. * Paints the specified component. This implementation does nothing.
* *
* @param context context for the component being painted * @param context context for the component being painted
* @param g {@code Graphics} object used for painting * @param g the {@code Graphics} object used for painting
* @see #update(Graphics,JComponent)
*/ */
protected void paint(SynthContext context, Graphics g) { protected void paint(SynthContext context, Graphics g) {
} }
......
...@@ -136,7 +136,16 @@ public class SynthPanelUI extends BasicPanelUI ...@@ -136,7 +136,16 @@ public class SynthPanelUI extends BasicPanelUI
} }
/** /**
* @inheritDoc * Notifies this UI delegate to repaint the specified component.
* This method paints the component background, then calls
* the {@link #paint(SynthContext,Graphics)} method.
*
* <p>In general, this method does not need to be overridden by subclasses.
* All Look and Feel rendering code should reside in the {@code paint} method.
*
* @param g the {@code Graphics} object used for painting
* @param c the component being painted
* @see #paint(SynthContext,Graphics)
*/ */
@Override @Override
public void update(Graphics g, JComponent c) { public void update(Graphics g, JComponent c) {
...@@ -150,7 +159,13 @@ public class SynthPanelUI extends BasicPanelUI ...@@ -150,7 +159,13 @@ public class SynthPanelUI extends BasicPanelUI
} }
/** /**
* @inheritDoc * Paints the specified component according to the Look and Feel.
* <p>This method is not used by Synth Look and Feel.
* Painting is handled by the {@link #paint(SynthContext,Graphics)} method.
*
* @param g the {@code Graphics} object used for painting
* @param c the component being painted
* @see #paint(SynthContext,Graphics)
*/ */
@Override @Override
public void paint(Graphics g, JComponent c) { public void paint(Graphics g, JComponent c) {
...@@ -164,7 +179,8 @@ public class SynthPanelUI extends BasicPanelUI ...@@ -164,7 +179,8 @@ public class SynthPanelUI extends BasicPanelUI
* Paints the specified component. This implementation does nothing. * Paints the specified component. This implementation does nothing.
* *
* @param context context for the component being painted * @param context context for the component being painted
* @param g {@code Graphics} object used for painting * @param g the {@code Graphics} object used for painting
* @see #update(Graphics,JComponent)
*/ */
protected void paint(SynthContext context, Graphics g) { protected void paint(SynthContext context, Graphics g) {
// do actual painting // do actual painting
......
...@@ -132,7 +132,16 @@ public class SynthPopupMenuUI extends BasicPopupMenuUI ...@@ -132,7 +132,16 @@ public class SynthPopupMenuUI extends BasicPopupMenuUI
} }
/** /**
* @inheritDoc * Notifies this UI delegate to repaint the specified component.
* This method paints the component background, then calls
* the {@link #paint(SynthContext,Graphics)} method.
*
* <p>In general, this method does not need to be overridden by subclasses.
* All Look and Feel rendering code should reside in the {@code paint} method.
*
* @param g the {@code Graphics} object used for painting
* @param c the component being painted
* @see #paint(SynthContext,Graphics)
*/ */
@Override @Override
public void update(Graphics g, JComponent c) { public void update(Graphics g, JComponent c) {
...@@ -146,7 +155,13 @@ public class SynthPopupMenuUI extends BasicPopupMenuUI ...@@ -146,7 +155,13 @@ public class SynthPopupMenuUI extends BasicPopupMenuUI
} }
/** /**
* @inheritDoc * Paints the specified component according to the Look and Feel.
* <p>This method is not used by Synth Look and Feel.
* Painting is handled by the {@link #paint(SynthContext,Graphics)} method.
*
* @param g the {@code Graphics} object used for painting
* @param c the component being painted
* @see #paint(SynthContext,Graphics)
*/ */
@Override @Override
public void paint(Graphics g, JComponent c) { public void paint(Graphics g, JComponent c) {
...@@ -160,7 +175,8 @@ public class SynthPopupMenuUI extends BasicPopupMenuUI ...@@ -160,7 +175,8 @@ public class SynthPopupMenuUI extends BasicPopupMenuUI
* Paints the specified component. This implementation does nothing. * Paints the specified component. This implementation does nothing.
* *
* @param context context for the component being painted * @param context context for the component being painted
* @param g {@code Graphics} object used for painting * @param g the {@code Graphics} object used for painting
* @see #update(Graphics,JComponent)
*/ */
protected void paint(SynthContext context, Graphics g) { protected void paint(SynthContext context, Graphics g) {
} }
......
...@@ -193,7 +193,16 @@ public class SynthProgressBarUI extends BasicProgressBarUI ...@@ -193,7 +193,16 @@ public class SynthProgressBarUI extends BasicProgressBarUI
} }
/** /**
* @inheritDoc * Notifies this UI delegate to repaint the specified component.
* This method paints the component background, then calls
* the {@link #paint(SynthContext,Graphics)} method.
*
* <p>In general, this method does not need to be overridden by subclasses.
* All Look and Feel rendering code should reside in the {@code paint} method.
*
* @param g the {@code Graphics} object used for painting
* @param c the component being painted
* @see #paint(SynthContext,Graphics)
*/ */
@Override @Override
public void update(Graphics g, JComponent c) { public void update(Graphics g, JComponent c) {
...@@ -208,7 +217,13 @@ public class SynthProgressBarUI extends BasicProgressBarUI ...@@ -208,7 +217,13 @@ public class SynthProgressBarUI extends BasicProgressBarUI
} }
/** /**
* @inheritDoc * Paints the specified component according to the Look and Feel.
* <p>This method is not used by Synth Look and Feel.
* Painting is handled by the {@link #paint(SynthContext,Graphics)} method.
*
* @param g the {@code Graphics} object used for painting
* @param c the component being painted
* @see #paint(SynthContext,Graphics)
*/ */
@Override @Override
public void paint(Graphics g, JComponent c) { public void paint(Graphics g, JComponent c) {
...@@ -222,7 +237,8 @@ public class SynthProgressBarUI extends BasicProgressBarUI ...@@ -222,7 +237,8 @@ public class SynthProgressBarUI extends BasicProgressBarUI
* Paints the specified component. * Paints the specified component.
* *
* @param context context for the component being painted * @param context context for the component being painted
* @param g {@code Graphics} object used for painting * @param g the {@code Graphics} object used for painting
* @see #update(Graphics,JComponent)
*/ */
protected void paint(SynthContext context, Graphics g) { protected void paint(SynthContext context, Graphics g) {
JProgressBar pBar = (JProgressBar)context.getComponent(); JProgressBar pBar = (JProgressBar)context.getComponent();
......
...@@ -102,7 +102,16 @@ public class SynthRootPaneUI extends BasicRootPaneUI implements SynthUI { ...@@ -102,7 +102,16 @@ public class SynthRootPaneUI extends BasicRootPaneUI implements SynthUI {
} }
/** /**
* @inheritDoc * Notifies this UI delegate to repaint the specified component.
* This method paints the component background, then calls
* the {@link #paint(SynthContext,Graphics)} method.
*
* <p>In general, this method does not need to be overridden by subclasses.
* All Look and Feel rendering code should reside in the {@code paint} method.
*
* @param g the {@code Graphics} object used for painting
* @param c the component being painted
* @see #paint(SynthContext,Graphics)
*/ */
@Override @Override
public void update(Graphics g, JComponent c) { public void update(Graphics g, JComponent c) {
...@@ -116,7 +125,13 @@ public class SynthRootPaneUI extends BasicRootPaneUI implements SynthUI { ...@@ -116,7 +125,13 @@ public class SynthRootPaneUI extends BasicRootPaneUI implements SynthUI {
} }
/** /**
* @inheritDoc * Paints the specified component according to the Look and Feel.
* <p>This method is not used by Synth Look and Feel.
* Painting is handled by the {@link #paint(SynthContext,Graphics)} method.
*
* @param g the {@code Graphics} object used for painting
* @param c the component being painted
* @see #paint(SynthContext,Graphics)
*/ */
@Override @Override
public void paint(Graphics g, JComponent c) { public void paint(Graphics g, JComponent c) {
...@@ -130,7 +145,8 @@ public class SynthRootPaneUI extends BasicRootPaneUI implements SynthUI { ...@@ -130,7 +145,8 @@ public class SynthRootPaneUI extends BasicRootPaneUI implements SynthUI {
* Paints the specified component. This implementation does nothing. * Paints the specified component. This implementation does nothing.
* *
* @param context context for the component being painted * @param context context for the component being painted
* @param g {@code Graphics} object used for painting * @param g the {@code Graphics} object used for painting
* @see #update(Graphics,JComponent)
*/ */
protected void paint(SynthContext context, Graphics g) { protected void paint(SynthContext context, Graphics g) {
} }
......
...@@ -222,7 +222,16 @@ public class SynthScrollBarUI extends BasicScrollBarUI ...@@ -222,7 +222,16 @@ public class SynthScrollBarUI extends BasicScrollBarUI
} }
/** /**
* @inheritDoc * Notifies this UI delegate to repaint the specified component.
* This method paints the component background, then calls
* the {@link #paint(SynthContext,Graphics)} method.
*
* <p>In general, this method does not need to be overridden by subclasses.
* All Look and Feel rendering code should reside in the {@code paint} method.
*
* @param g the {@code Graphics} object used for painting
* @param c the component being painted
* @see #paint(SynthContext,Graphics)
*/ */
@Override @Override
public void update(Graphics g, JComponent c) { public void update(Graphics g, JComponent c) {
...@@ -237,7 +246,13 @@ public class SynthScrollBarUI extends BasicScrollBarUI ...@@ -237,7 +246,13 @@ public class SynthScrollBarUI extends BasicScrollBarUI
} }
/** /**
* @inheritDoc * Paints the specified component according to the Look and Feel.
* <p>This method is not used by Synth Look and Feel.
* Painting is handled by the {@link #paint(SynthContext,Graphics)} method.
*
* @param g the {@code Graphics} object used for painting
* @param c the component being painted
* @see #paint(SynthContext,Graphics)
*/ */
@Override @Override
public void paint(Graphics g, JComponent c) { public void paint(Graphics g, JComponent c) {
...@@ -251,7 +266,8 @@ public class SynthScrollBarUI extends BasicScrollBarUI ...@@ -251,7 +266,8 @@ public class SynthScrollBarUI extends BasicScrollBarUI
* Paints the specified component. * Paints the specified component.
* *
* @param context context for the component being painted * @param context context for the component being painted
* @param g {@code Graphics} object used for painting * @param g the {@code Graphics} object used for painting
* @see #update(Graphics,JComponent)
*/ */
protected void paint(SynthContext context, Graphics g) { protected void paint(SynthContext context, Graphics g) {
SynthContext subcontext = getContext(scrollbar, SynthContext subcontext = getContext(scrollbar,
......
...@@ -64,7 +64,16 @@ public class SynthScrollPaneUI extends BasicScrollPaneUI ...@@ -64,7 +64,16 @@ public class SynthScrollPaneUI extends BasicScrollPaneUI
} }
/** /**
* @inheritDoc * Notifies this UI delegate to repaint the specified component.
* This method paints the component background, then calls
* the {@link #paint(SynthContext,Graphics)} method.
*
* <p>In general, this method does not need to be overridden by subclasses.
* All Look and Feel rendering code should reside in the {@code paint} method.
*
* @param g the {@code Graphics} object used for painting
* @param c the component being painted
* @see #paint(SynthContext,Graphics)
*/ */
@Override @Override
public void update(Graphics g, JComponent c) { public void update(Graphics g, JComponent c) {
...@@ -78,7 +87,13 @@ public class SynthScrollPaneUI extends BasicScrollPaneUI ...@@ -78,7 +87,13 @@ public class SynthScrollPaneUI extends BasicScrollPaneUI
} }
/** /**
* @inheritDoc * Paints the specified component according to the Look and Feel.
* <p>This method is not used by Synth Look and Feel.
* Painting is handled by the {@link #paint(SynthContext,Graphics)} method.
*
* @param g the {@code Graphics} object used for painting
* @param c the component being painted
* @see #paint(SynthContext,Graphics)
*/ */
@Override @Override
public void paint(Graphics g, JComponent c) { public void paint(Graphics g, JComponent c) {
...@@ -92,7 +107,8 @@ public class SynthScrollPaneUI extends BasicScrollPaneUI ...@@ -92,7 +107,8 @@ public class SynthScrollPaneUI extends BasicScrollPaneUI
* Paints the specified component. * Paints the specified component.
* *
* @param context context for the component being painted * @param context context for the component being painted
* @param g {@code Graphics} object used for painting * @param g the {@code Graphics} object used for painting
* @see #update(Graphics,JComponent)
*/ */
protected void paint(SynthContext context, Graphics g) { protected void paint(SynthContext context, Graphics g) {
Border vpBorder = scrollpane.getViewportBorder(); Border vpBorder = scrollpane.getViewportBorder();
......
...@@ -135,7 +135,16 @@ public class SynthSeparatorUI extends SeparatorUI ...@@ -135,7 +135,16 @@ public class SynthSeparatorUI extends SeparatorUI
} }
/** /**
* @inheritDoc * Notifies this UI delegate to repaint the specified component.
* This method paints the component background, then calls
* the {@link #paint(SynthContext,Graphics)} method.
*
* <p>In general, this method does not need to be overridden by subclasses.
* All Look and Feel rendering code should reside in the {@code paint} method.
*
* @param g the {@code Graphics} object used for painting
* @param c the component being painted
* @see #paint(SynthContext,Graphics)
*/ */
@Override @Override
public void update(Graphics g, JComponent c) { public void update(Graphics g, JComponent c) {
...@@ -151,7 +160,13 @@ public class SynthSeparatorUI extends SeparatorUI ...@@ -151,7 +160,13 @@ public class SynthSeparatorUI extends SeparatorUI
} }
/** /**
* @inheritDoc * Paints the specified component according to the Look and Feel.
* <p>This method is not used by Synth Look and Feel.
* Painting is handled by the {@link #paint(SynthContext,Graphics)} method.
*
* @param g the {@code Graphics} object used for painting
* @param c the component being painted
* @see #paint(SynthContext,Graphics)
*/ */
@Override @Override
public void paint(Graphics g, JComponent c) { public void paint(Graphics g, JComponent c) {
...@@ -165,7 +180,8 @@ public class SynthSeparatorUI extends SeparatorUI ...@@ -165,7 +180,8 @@ public class SynthSeparatorUI extends SeparatorUI
* Paints the specified component. * Paints the specified component.
* *
* @param context context for the component being painted * @param context context for the component being painted
* @param g {@code Graphics} object used for painting * @param g the {@code Graphics} object used for painting
* @see #update(Graphics,JComponent)
*/ */
protected void paint(SynthContext context, Graphics g) { protected void paint(SynthContext context, Graphics g) {
JSeparator separator = (JSeparator)context.getComponent(); JSeparator separator = (JSeparator)context.getComponent();
......
...@@ -788,7 +788,16 @@ public class SynthSliderUI extends BasicSliderUI ...@@ -788,7 +788,16 @@ public class SynthSliderUI extends BasicSliderUI
} }
/** /**
* @inheritDoc * Notifies this UI delegate to repaint the specified component.
* This method paints the component background, then calls
* the {@link #paint(SynthContext,Graphics)} method.
*
* <p>In general, this method does not need to be overridden by subclasses.
* All Look and Feel rendering code should reside in the {@code paint} method.
*
* @param g the {@code Graphics} object used for painting
* @param c the component being painted
* @see #paint(SynthContext,Graphics)
*/ */
@Override @Override
public void update(Graphics g, JComponent c) { public void update(Graphics g, JComponent c) {
...@@ -802,7 +811,13 @@ public class SynthSliderUI extends BasicSliderUI ...@@ -802,7 +811,13 @@ public class SynthSliderUI extends BasicSliderUI
} }
/** /**
* @inheritDoc * Paints the specified component according to the Look and Feel.
* <p>This method is not used by Synth Look and Feel.
* Painting is handled by the {@link #paint(SynthContext,Graphics)} method.
*
* @param g the {@code Graphics} object used for painting
* @param c the component being painted
* @see #paint(SynthContext,Graphics)
*/ */
@Override @Override
public void paint(Graphics g, JComponent c) { public void paint(Graphics g, JComponent c) {
...@@ -815,7 +830,8 @@ public class SynthSliderUI extends BasicSliderUI ...@@ -815,7 +830,8 @@ public class SynthSliderUI extends BasicSliderUI
* Paints the specified component. * Paints the specified component.
* *
* @param context context for the component being painted * @param context context for the component being painted
* @param g {@code Graphics} object used for painting * @param g the {@code Graphics} object used for painting
* @see #update(Graphics,JComponent)
*/ */
protected void paint(SynthContext context, Graphics g) { protected void paint(SynthContext context, Graphics g) {
recalculateIfInsetsChanged(); recalculateIfInsetsChanged();
......
...@@ -283,7 +283,16 @@ public class SynthSpinnerUI extends BasicSpinnerUI ...@@ -283,7 +283,16 @@ public class SynthSpinnerUI extends BasicSpinnerUI
} }
/** /**
* @inheritDoc * Notifies this UI delegate to repaint the specified component.
* This method paints the component background, then calls
* the {@link #paint(SynthContext,Graphics)} method.
*
* <p>In general, this method does not need to be overridden by subclasses.
* All Look and Feel rendering code should reside in the {@code paint} method.
*
* @param g the {@code Graphics} object used for painting
* @param c the component being painted
* @see #paint(SynthContext,Graphics)
*/ */
@Override @Override
public void update(Graphics g, JComponent c) { public void update(Graphics g, JComponent c) {
...@@ -298,7 +307,13 @@ public class SynthSpinnerUI extends BasicSpinnerUI ...@@ -298,7 +307,13 @@ public class SynthSpinnerUI extends BasicSpinnerUI
/** /**
* @inheritDoc * Paints the specified component according to the Look and Feel.
* <p>This method is not used by Synth Look and Feel.
* Painting is handled by the {@link #paint(SynthContext,Graphics)} method.
*
* @param g the {@code Graphics} object used for painting
* @param c the component being painted
* @see #paint(SynthContext,Graphics)
*/ */
@Override @Override
public void paint(Graphics g, JComponent c) { public void paint(Graphics g, JComponent c) {
...@@ -312,7 +327,8 @@ public class SynthSpinnerUI extends BasicSpinnerUI ...@@ -312,7 +327,8 @@ public class SynthSpinnerUI extends BasicSpinnerUI
* Paints the specified component. This implementation does nothing. * Paints the specified component. This implementation does nothing.
* *
* @param context context for the component being painted * @param context context for the component being painted
* @param g {@code Graphics} object used for painting * @param g the {@code Graphics} object used for painting
* @see #update(Graphics,JComponent)
*/ */
protected void paint(SynthContext context, Graphics g) { protected void paint(SynthContext context, Graphics g) {
} }
......
...@@ -269,7 +269,16 @@ public class SynthSplitPaneUI extends BasicSplitPaneUI ...@@ -269,7 +269,16 @@ public class SynthSplitPaneUI extends BasicSplitPaneUI
} }
/** /**
* @inheritDoc * Notifies this UI delegate to repaint the specified component.
* This method paints the component background, then calls
* the {@link #paint(SynthContext,Graphics)} method.
*
* <p>In general, this method does not need to be overridden by subclasses.
* All Look and Feel rendering code should reside in the {@code paint} method.
*
* @param g the {@code Graphics} object used for painting
* @param c the component being painted
* @see #paint(SynthContext,Graphics)
*/ */
@Override @Override
public void update(Graphics g, JComponent c) { public void update(Graphics g, JComponent c) {
...@@ -283,7 +292,13 @@ public class SynthSplitPaneUI extends BasicSplitPaneUI ...@@ -283,7 +292,13 @@ public class SynthSplitPaneUI extends BasicSplitPaneUI
} }
/** /**
* @inheritDoc * Paints the specified component according to the Look and Feel.
* <p>This method is not used by Synth Look and Feel.
* Painting is handled by the {@link #paint(SynthContext,Graphics)} method.
*
* @param g the {@code Graphics} object used for painting
* @param c the component being painted
* @see #paint(SynthContext,Graphics)
*/ */
@Override @Override
public void paint(Graphics g, JComponent c) { public void paint(Graphics g, JComponent c) {
...@@ -297,7 +312,8 @@ public class SynthSplitPaneUI extends BasicSplitPaneUI ...@@ -297,7 +312,8 @@ public class SynthSplitPaneUI extends BasicSplitPaneUI
* Paints the specified component. This implementation does nothing. * Paints the specified component. This implementation does nothing.
* *
* @param context context for the component being painted * @param context context for the component being painted
* @param g {@code Graphics} object used for painting * @param g the {@code Graphics} object used for painting
* @see #update(Graphics,JComponent)
*/ */
protected void paint(SynthContext context, Graphics g) { protected void paint(SynthContext context, Graphics g) {
// This is done to update package private variables in // This is done to update package private variables in
......
...@@ -92,8 +92,8 @@ public class SynthTabbedPaneUI extends BasicTabbedPaneUI ...@@ -92,8 +92,8 @@ public class SynthTabbedPaneUI extends BasicTabbedPaneUI
private SynthStyle tabAreaStyle; private SynthStyle tabAreaStyle;
private SynthStyle tabContentStyle; private SynthStyle tabContentStyle;
private Rectangle textRect; private Rectangle textRect = new Rectangle();
private Rectangle iconRect; private Rectangle iconRect = new Rectangle();
private Rectangle tabAreaBounds = new Rectangle(); private Rectangle tabAreaBounds = new Rectangle();
...@@ -115,11 +115,6 @@ public class SynthTabbedPaneUI extends BasicTabbedPaneUI ...@@ -115,11 +115,6 @@ public class SynthTabbedPaneUI extends BasicTabbedPaneUI
return new SynthTabbedPaneUI(); return new SynthTabbedPaneUI();
} }
private SynthTabbedPaneUI() {
textRect = new Rectangle();
iconRect = new Rectangle();
}
private boolean scrollableTabLayoutEnabled() { private boolean scrollableTabLayoutEnabled() {
return (tabPane.getTabLayoutPolicy() == JTabbedPane.SCROLL_TAB_LAYOUT); return (tabPane.getTabLayoutPolicy() == JTabbedPane.SCROLL_TAB_LAYOUT);
} }
...@@ -362,7 +357,16 @@ public class SynthTabbedPaneUI extends BasicTabbedPaneUI ...@@ -362,7 +357,16 @@ public class SynthTabbedPaneUI extends BasicTabbedPaneUI
} }
/** /**
* @inheritDoc * Notifies this UI delegate to repaint the specified component.
* This method paints the component background, then calls
* the {@link #paint(SynthContext,Graphics)} method.
*
* <p>In general, this method does not need to be overridden by subclasses.
* All Look and Feel rendering code should reside in the {@code paint} method.
*
* @param g the {@code Graphics} object used for painting
* @param c the component being painted
* @see #paint(SynthContext,Graphics)
*/ */
@Override @Override
public void update(Graphics g, JComponent c) { public void update(Graphics g, JComponent c) {
...@@ -409,7 +413,13 @@ public class SynthTabbedPaneUI extends BasicTabbedPaneUI ...@@ -409,7 +413,13 @@ public class SynthTabbedPaneUI extends BasicTabbedPaneUI
} }
/** /**
* @inheritDoc * Paints the specified component according to the Look and Feel.
* <p>This method is not used by Synth Look and Feel.
* Painting is handled by the {@link #paint(SynthContext,Graphics)} method.
*
* @param g the {@code Graphics} object used for painting
* @param c the component being painted
* @see #paint(SynthContext,Graphics)
*/ */
@Override @Override
public void paint(Graphics g, JComponent c) { public void paint(Graphics g, JComponent c) {
...@@ -423,7 +433,8 @@ public class SynthTabbedPaneUI extends BasicTabbedPaneUI ...@@ -423,7 +433,8 @@ public class SynthTabbedPaneUI extends BasicTabbedPaneUI
* Paints the specified component. * Paints the specified component.
* *
* @param context context for the component being painted * @param context context for the component being painted
* @param g {@code Graphics} object used for painting * @param g the {@code Graphics} object used for painting
* @see #update(Graphics,JComponent)
*/ */
protected void paint(SynthContext context, Graphics g) { protected void paint(SynthContext context, Graphics g) {
int selectedIndex = tabPane.getSelectedIndex(); int selectedIndex = tabPane.getSelectedIndex();
......
...@@ -123,7 +123,16 @@ public class SynthTableHeaderUI extends BasicTableHeaderUI ...@@ -123,7 +123,16 @@ public class SynthTableHeaderUI extends BasicTableHeaderUI
} }
/** /**
* @inheritDoc * Notifies this UI delegate to repaint the specified component.
* This method paints the component background, then calls
* the {@link #paint(SynthContext,Graphics)} method.
*
* <p>In general, this method does not need to be overridden by subclasses.
* All Look and Feel rendering code should reside in the {@code paint} method.
*
* @param g the {@code Graphics} object used for painting
* @param c the component being painted
* @see #paint(SynthContext,Graphics)
*/ */
@Override @Override
public void update(Graphics g, JComponent c) { public void update(Graphics g, JComponent c) {
...@@ -137,7 +146,13 @@ public class SynthTableHeaderUI extends BasicTableHeaderUI ...@@ -137,7 +146,13 @@ public class SynthTableHeaderUI extends BasicTableHeaderUI
} }
/** /**
* @inheritDoc * Paints the specified component according to the Look and Feel.
* <p>This method is not used by Synth Look and Feel.
* Painting is handled by the {@link #paint(SynthContext,Graphics)} method.
*
* @param g the {@code Graphics} object used for painting
* @param c the component being painted
* @see #paint(SynthContext,Graphics)
*/ */
@Override @Override
public void paint(Graphics g, JComponent c) { public void paint(Graphics g, JComponent c) {
...@@ -151,7 +166,8 @@ public class SynthTableHeaderUI extends BasicTableHeaderUI ...@@ -151,7 +166,8 @@ public class SynthTableHeaderUI extends BasicTableHeaderUI
* Paints the specified component. * Paints the specified component.
* *
* @param context context for the component being painted * @param context context for the component being painted
* @param g {@code Graphics} object used for painting * @param g the {@code Graphics} object used for painting
* @see #update(Graphics,JComponent)
*/ */
protected void paint(SynthContext context, Graphics g) { protected void paint(SynthContext context, Graphics g) {
super.paint(g, context.getComponent()); super.paint(g, context.getComponent());
......
...@@ -256,7 +256,16 @@ public class SynthTableUI extends BasicTableUI ...@@ -256,7 +256,16 @@ public class SynthTableUI extends BasicTableUI
// //
/** /**
* @inheritDoc * Notifies this UI delegate to repaint the specified component.
* This method paints the component background, then calls
* the {@link #paint(SynthContext,Graphics)} method.
*
* <p>In general, this method does not need to be overridden by subclasses.
* All Look and Feel rendering code should reside in the {@code paint} method.
*
* @param g the {@code Graphics} object used for painting
* @param c the component being painted
* @see #paint(SynthContext,Graphics)
*/ */
@Override @Override
public void update(Graphics g, JComponent c) { public void update(Graphics g, JComponent c) {
...@@ -279,7 +288,13 @@ public class SynthTableUI extends BasicTableUI ...@@ -279,7 +288,13 @@ public class SynthTableUI extends BasicTableUI
} }
/** /**
* @inheritDoc * Paints the specified component according to the Look and Feel.
* <p>This method is not used by Synth Look and Feel.
* Painting is handled by the {@link #paint(SynthContext,Graphics)} method.
*
* @param g the {@code Graphics} object used for painting
* @param c the component being painted
* @see #paint(SynthContext,Graphics)
*/ */
@Override @Override
public void paint(Graphics g, JComponent c) { public void paint(Graphics g, JComponent c) {
...@@ -293,7 +308,8 @@ public class SynthTableUI extends BasicTableUI ...@@ -293,7 +308,8 @@ public class SynthTableUI extends BasicTableUI
* Paints the specified component. * Paints the specified component.
* *
* @param context context for the component being painted * @param context context for the component being painted
* @param g {@code Graphics} object used for painting * @param g the {@code Graphics} object used for painting
* @see #update(Graphics,JComponent)
*/ */
protected void paint(SynthContext context, Graphics g) { protected void paint(SynthContext context, Graphics g) {
Rectangle clip = g.getClipBounds(); Rectangle clip = g.getClipBounds();
......
...@@ -123,7 +123,16 @@ public class SynthTextAreaUI extends BasicTextAreaUI implements SynthUI { ...@@ -123,7 +123,16 @@ public class SynthTextAreaUI extends BasicTextAreaUI implements SynthUI {
} }
/** /**
* @inheritDoc * Notifies this UI delegate to repaint the specified component.
* This method paints the component background, then calls
* the {@link #paint(SynthContext,Graphics)} method.
*
* <p>In general, this method does not need to be overridden by subclasses.
* All Look and Feel rendering code should reside in the {@code paint} method.
*
* @param g the {@code Graphics} object used for painting
* @param c the component being painted
* @see #paint(SynthContext,Graphics)
*/ */
@Override @Override
public void update(Graphics g, JComponent c) { public void update(Graphics g, JComponent c) {
...@@ -140,7 +149,8 @@ public class SynthTextAreaUI extends BasicTextAreaUI implements SynthUI { ...@@ -140,7 +149,8 @@ public class SynthTextAreaUI extends BasicTextAreaUI implements SynthUI {
* Paints the specified component. * Paints the specified component.
* *
* @param context context for the component being painted * @param context context for the component being painted
* @param g {@code Graphics} object used for painting * @param g the {@code Graphics} object used for painting
* @see #update(Graphics,JComponent)
*/ */
protected void paint(SynthContext context, Graphics g) { protected void paint(SynthContext context, Graphics g) {
super.paint(g, getComponent()); super.paint(g, getComponent());
......
...@@ -161,7 +161,16 @@ public class SynthTextFieldUI extends BasicTextFieldUI implements SynthUI { ...@@ -161,7 +161,16 @@ public class SynthTextFieldUI extends BasicTextFieldUI implements SynthUI {
} }
/** /**
* @inheritDoc * Notifies this UI delegate to repaint the specified component.
* This method paints the component background, then calls
* the {@link #paint(SynthContext,Graphics)} method.
*
* <p>In general, this method does not need to be overridden by subclasses.
* All Look and Feel rendering code should reside in the {@code paint} method.
*
* @param g the {@code Graphics} object used for painting
* @param c the component being painted
* @see #paint(SynthContext,Graphics)
*/ */
@Override @Override
public void update(Graphics g, JComponent c) { public void update(Graphics g, JComponent c) {
...@@ -182,7 +191,8 @@ public class SynthTextFieldUI extends BasicTextFieldUI implements SynthUI { ...@@ -182,7 +191,8 @@ public class SynthTextFieldUI extends BasicTextFieldUI implements SynthUI {
* model to potentially be updated asynchronously. * model to potentially be updated asynchronously.
* *
* @param context context for the component being painted * @param context context for the component being painted
* @param g {@code Graphics} object used for painting * @param g the {@code Graphics} object used for painting
* @see #update(Graphics,JComponent)
*/ */
protected void paint(SynthContext context, Graphics g) { protected void paint(SynthContext context, Graphics g) {
super.paint(g, getComponent()); super.paint(g, getComponent());
......
...@@ -198,7 +198,16 @@ public class SynthToolBarUI extends BasicToolBarUI ...@@ -198,7 +198,16 @@ public class SynthToolBarUI extends BasicToolBarUI
} }
/** /**
* @inheritDoc * Notifies this UI delegate to repaint the specified component.
* This method paints the component background, then calls
* the {@link #paint(SynthContext,Graphics)} method.
*
* <p>In general, this method does not need to be overridden by subclasses.
* All Look and Feel rendering code should reside in the {@code paint} method.
*
* @param g the {@code Graphics} object used for painting
* @param c the component being painted
* @see #paint(SynthContext,Graphics)
*/ */
@Override @Override
public void update(Graphics g, JComponent c) { public void update(Graphics g, JComponent c) {
...@@ -213,7 +222,13 @@ public class SynthToolBarUI extends BasicToolBarUI ...@@ -213,7 +222,13 @@ public class SynthToolBarUI extends BasicToolBarUI
} }
/** /**
* @inheritDoc * Paints the specified component according to the Look and Feel.
* <p>This method is not used by Synth Look and Feel.
* Painting is handled by the {@link #paint(SynthContext,Graphics)} method.
*
* @param g the {@code Graphics} object used for painting
* @param c the component being painted
* @see #paint(SynthContext,Graphics)
*/ */
@Override @Override
public void paint(Graphics g, JComponent c) { public void paint(Graphics g, JComponent c) {
...@@ -258,7 +273,8 @@ public class SynthToolBarUI extends BasicToolBarUI ...@@ -258,7 +273,8 @@ public class SynthToolBarUI extends BasicToolBarUI
* Paints the toolbar. * Paints the toolbar.
* *
* @param context context for the component being painted * @param context context for the component being painted
* @param g {@code Graphics} object used for painting * @param g the {@code Graphics} object used for painting
* @see #update(Graphics,JComponent)
*/ */
protected void paint(SynthContext context, Graphics g) { protected void paint(SynthContext context, Graphics g) {
if (handleIcon != null && toolBar.isFloatable()) { if (handleIcon != null && toolBar.isFloatable()) {
......
...@@ -121,7 +121,16 @@ public class SynthToolTipUI extends BasicToolTipUI ...@@ -121,7 +121,16 @@ public class SynthToolTipUI extends BasicToolTipUI
} }
/** /**
* @inheritDoc * Notifies this UI delegate to repaint the specified component.
* This method paints the component background, then calls
* the {@link #paint(SynthContext,Graphics)} method.
*
* <p>In general, this method does not need to be overridden by subclasses.
* All Look and Feel rendering code should reside in the {@code paint} method.
*
* @param g the {@code Graphics} object used for painting
* @param c the component being painted
* @see #paint(SynthContext,Graphics)
*/ */
@Override @Override
public void update(Graphics g, JComponent c) { public void update(Graphics g, JComponent c) {
...@@ -144,7 +153,13 @@ public class SynthToolTipUI extends BasicToolTipUI ...@@ -144,7 +153,13 @@ public class SynthToolTipUI extends BasicToolTipUI
} }
/** /**
* @inheritDoc * Paints the specified component according to the Look and Feel.
* <p>This method is not used by Synth Look and Feel.
* Painting is handled by the {@link #paint(SynthContext,Graphics)} method.
*
* @param g the {@code Graphics} object used for painting
* @param c the component being painted
* @see #paint(SynthContext,Graphics)
*/ */
@Override @Override
public void paint(Graphics g, JComponent c) { public void paint(Graphics g, JComponent c) {
...@@ -158,7 +173,8 @@ public class SynthToolTipUI extends BasicToolTipUI ...@@ -158,7 +173,8 @@ public class SynthToolTipUI extends BasicToolTipUI
* Paints the specified component. * Paints the specified component.
* *
* @param context context for the component being painted * @param context context for the component being painted
* @param g {@code Graphics} object used for painting * @param g the {@code Graphics} object used for painting
* @see #update(Graphics,JComponent)
*/ */
protected void paint(SynthContext context, Graphics g) { protected void paint(SynthContext context, Graphics g) {
JToolTip tip = (JToolTip)context.getComponent(); JToolTip tip = (JToolTip)context.getComponent();
......
...@@ -250,7 +250,16 @@ public class SynthTreeUI extends BasicTreeUI ...@@ -250,7 +250,16 @@ public class SynthTreeUI extends BasicTreeUI
} }
/** /**
* @inheritDoc * Notifies this UI delegate to repaint the specified component.
* This method paints the component background, then calls
* the {@link #paint(SynthContext,Graphics)} method.
*
* <p>In general, this method does not need to be overridden by subclasses.
* All Look and Feel rendering code should reside in the {@code paint} method.
*
* @param g the {@code Graphics} object used for painting
* @param c the component being painted
* @see #paint(SynthContext,Graphics)
*/ */
@Override @Override
public void update(Graphics g, JComponent c) { public void update(Graphics g, JComponent c) {
...@@ -273,7 +282,13 @@ public class SynthTreeUI extends BasicTreeUI ...@@ -273,7 +282,13 @@ public class SynthTreeUI extends BasicTreeUI
} }
/** /**
* @inheritDoc * Paints the specified component according to the Look and Feel.
* <p>This method is not used by Synth Look and Feel.
* Painting is handled by the {@link #paint(SynthContext,Graphics)} method.
*
* @param g the {@code Graphics} object used for painting
* @param c the component being painted
* @see #paint(SynthContext,Graphics)
*/ */
@Override @Override
public void paint(Graphics g, JComponent c) { public void paint(Graphics g, JComponent c) {
...@@ -287,7 +302,8 @@ public class SynthTreeUI extends BasicTreeUI ...@@ -287,7 +302,8 @@ public class SynthTreeUI extends BasicTreeUI
* Paints the specified component. * Paints the specified component.
* *
* @param context context for the component being painted * @param context context for the component being painted
* @param g {@code Graphics} object used for painting * @param g the {@code Graphics} object used for painting
* @see #update(Graphics,JComponent)
*/ */
protected void paint(SynthContext context, Graphics g) { protected void paint(SynthContext context, Graphics g) {
paintContext = context; paintContext = context;
......
...@@ -150,7 +150,16 @@ public class SynthViewportUI extends ViewportUI ...@@ -150,7 +150,16 @@ public class SynthViewportUI extends ViewportUI
} }
/** /**
* @inheritDoc * Notifies this UI delegate to repaint the specified component.
* This method paints the component background, then calls
* the {@link #paint(SynthContext,Graphics)} method.
*
* <p>In general, this method does not need to be overridden by subclasses.
* All Look and Feel rendering code should reside in the {@code paint} method.
*
* @param g the {@code Graphics} object used for painting
* @param c the component being painted
* @see #paint(SynthContext,Graphics)
*/ */
@Override @Override
public void update(Graphics g, JComponent c) { public void update(Graphics g, JComponent c) {
...@@ -174,7 +183,13 @@ public class SynthViewportUI extends ViewportUI ...@@ -174,7 +183,13 @@ public class SynthViewportUI extends ViewportUI
} }
/** /**
* @inheritDoc * Paints the specified component according to the Look and Feel.
* <p>This method is not used by Synth Look and Feel.
* Painting is handled by the {@link #paint(SynthContext,Graphics)} method.
*
* @param g the {@code Graphics} object used for painting
* @param c the component being painted
* @see #paint(SynthContext,Graphics)
*/ */
@Override @Override
public void paint(Graphics g, JComponent c) { public void paint(Graphics g, JComponent c) {
...@@ -188,7 +203,8 @@ public class SynthViewportUI extends ViewportUI ...@@ -188,7 +203,8 @@ public class SynthViewportUI extends ViewportUI
* Paints the specified component. This implementation does nothing. * Paints the specified component. This implementation does nothing.
* *
* @param context context for the component being painted * @param context context for the component being painted
* @param g {@code Graphics} object used for painting * @param g the {@code Graphics} object used for painting
* @see #update(Graphics,JComponent)
*/ */
protected void paint(SynthContext context, Graphics g) { protected void paint(SynthContext context, Graphics g) {
} }
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册