8250849: Address reliance on default constructors in the javax.swing.plaf APIs
Reviewed-by: prr, serb
This commit is contained in:
parent
2ef86262e0
commit
69c0df6b8f
@ -36,4 +36,8 @@ import java.awt.Insets;
|
||||
* @author Jeff Dinkins
|
||||
*/
|
||||
public abstract class ButtonUI extends ComponentUI {
|
||||
/**
|
||||
* Constructor for subclasses to call.
|
||||
*/
|
||||
protected ButtonUI() {}
|
||||
}
|
||||
|
@ -37,5 +37,8 @@ import javax.swing.colorchooser.*;
|
||||
|
||||
public abstract class ColorChooserUI extends ComponentUI
|
||||
{
|
||||
|
||||
/**
|
||||
* Constructor for subclasses to call.
|
||||
*/
|
||||
protected ColorChooserUI() {}
|
||||
}
|
||||
|
@ -35,6 +35,11 @@ import javax.swing.JComboBox;
|
||||
*/
|
||||
public abstract class ComboBoxUI extends ComponentUI {
|
||||
|
||||
/**
|
||||
* Constructor for subclasses to call.
|
||||
*/
|
||||
protected ComboBoxUI() {}
|
||||
|
||||
/**
|
||||
* Set the visibility of the popup
|
||||
*
|
||||
|
@ -32,4 +32,8 @@ package javax.swing.plaf;
|
||||
* @author David Kloba
|
||||
*/
|
||||
public abstract class DesktopIconUI extends ComponentUI {
|
||||
/**
|
||||
* Constructor for subclasses to call.
|
||||
*/
|
||||
protected DesktopIconUI() {}
|
||||
}
|
||||
|
@ -32,4 +32,8 @@ package javax.swing.plaf;
|
||||
* @author David Kloba
|
||||
*/
|
||||
public abstract class DesktopPaneUI extends ComponentUI {
|
||||
/**
|
||||
* Constructor for subclasses to call.
|
||||
*/
|
||||
protected DesktopPaneUI() {}
|
||||
}
|
||||
|
@ -38,6 +38,11 @@ import java.io.File;
|
||||
|
||||
public abstract class FileChooserUI extends ComponentUI
|
||||
{
|
||||
/**
|
||||
* Constructor for subclasses to call.
|
||||
*/
|
||||
protected FileChooserUI() {}
|
||||
|
||||
/**
|
||||
* Returns an accept-all file filter.
|
||||
* @param fc the file chooser
|
||||
|
@ -31,4 +31,8 @@ package javax.swing.plaf;
|
||||
* @author David Kloba
|
||||
*/
|
||||
public abstract class InternalFrameUI extends ComponentUI {
|
||||
/**
|
||||
* Constructor for subclasses to call.
|
||||
*/
|
||||
protected InternalFrameUI() {}
|
||||
}
|
||||
|
@ -31,4 +31,9 @@ package javax.swing.plaf;
|
||||
* @author Hans Muller
|
||||
*/
|
||||
public abstract class LabelUI extends ComponentUI {
|
||||
/**
|
||||
* Constructor for subclasses to call.
|
||||
*/
|
||||
protected LabelUI() {}
|
||||
}
|
||||
|
||||
|
@ -65,6 +65,11 @@ public class LayerUI<V extends Component>
|
||||
private final PropertyChangeSupport propertyChangeSupport =
|
||||
new PropertyChangeSupport(this);
|
||||
|
||||
/**
|
||||
* Constructs a {@code LayerUI}.
|
||||
*/
|
||||
public LayerUI() {}
|
||||
|
||||
/**
|
||||
* Paints the specified component.
|
||||
* Subclasses should override this method and use
|
||||
|
@ -38,6 +38,11 @@ import java.awt.Rectangle;
|
||||
|
||||
public abstract class ListUI extends ComponentUI
|
||||
{
|
||||
/**
|
||||
* Constructor for subclasses to call.
|
||||
*/
|
||||
protected ListUI() {}
|
||||
|
||||
/**
|
||||
* Returns the cell index in the specified {@code JList} closest to the
|
||||
* given location in the list's coordinate system. To determine if the
|
||||
|
@ -36,4 +36,9 @@ import javax.swing.JMenu;
|
||||
* @author David Karlton
|
||||
*/
|
||||
|
||||
public abstract class MenuBarUI extends ComponentUI { }
|
||||
public abstract class MenuBarUI extends ComponentUI {
|
||||
/**
|
||||
* Constructor for subclasses to call.
|
||||
*/
|
||||
protected MenuBarUI() {}
|
||||
}
|
||||
|
@ -35,4 +35,8 @@ import java.awt.event.*;
|
||||
* @author Arnaud Weber
|
||||
*/
|
||||
public abstract class MenuItemUI extends ButtonUI {
|
||||
/**
|
||||
* Constructor for subclasses to call.
|
||||
*/
|
||||
protected MenuItemUI() {}
|
||||
}
|
||||
|
@ -35,6 +35,11 @@ import javax.swing.JOptionPane;
|
||||
|
||||
public abstract class OptionPaneUI extends ComponentUI
|
||||
{
|
||||
/**
|
||||
* Constructor for subclasses to call.
|
||||
*/
|
||||
protected OptionPaneUI() {}
|
||||
|
||||
/**
|
||||
* Requests the component representing the default value to have
|
||||
* focus.
|
||||
|
@ -32,4 +32,8 @@ package javax.swing.plaf;
|
||||
* @author Steve Wilson
|
||||
*/
|
||||
public abstract class PanelUI extends ComponentUI {
|
||||
/**
|
||||
* Constructor for subclasses to call.
|
||||
*/
|
||||
protected PanelUI() {}
|
||||
}
|
||||
|
@ -38,6 +38,11 @@ import javax.swing.JPopupMenu;
|
||||
*/
|
||||
|
||||
public abstract class PopupMenuUI extends ComponentUI {
|
||||
/**
|
||||
* Constructor for subclasses to call.
|
||||
*/
|
||||
protected PopupMenuUI() {}
|
||||
|
||||
/**
|
||||
* Returns whether or not the given {@code MouseEvent} is the popup menu
|
||||
* trigger event for the platform
|
||||
|
@ -32,4 +32,8 @@ package javax.swing.plaf;
|
||||
* @author Rob Davis
|
||||
*/
|
||||
public abstract class ProgressBarUI extends ComponentUI {
|
||||
/**
|
||||
* Constructor for subclasses to call.
|
||||
*/
|
||||
protected ProgressBarUI() {}
|
||||
}
|
||||
|
@ -32,4 +32,8 @@ package javax.swing.plaf;
|
||||
* @since 1.3
|
||||
*/
|
||||
public abstract class RootPaneUI extends ComponentUI {
|
||||
/**
|
||||
* Constructor for subclasses to call.
|
||||
*/
|
||||
protected RootPaneUI() {}
|
||||
}
|
||||
|
@ -31,4 +31,8 @@ package javax.swing.plaf;
|
||||
* @author David Kloba
|
||||
*/
|
||||
public abstract class ScrollBarUI extends ComponentUI {
|
||||
/**
|
||||
* Constructor for subclasses to call.
|
||||
*/
|
||||
protected ScrollBarUI() {}
|
||||
}
|
||||
|
@ -33,4 +33,8 @@ package javax.swing.plaf;
|
||||
*/
|
||||
|
||||
public abstract class ScrollPaneUI extends ComponentUI {
|
||||
/**
|
||||
* Constructor for subclasses to call.
|
||||
*/
|
||||
protected ScrollPaneUI() {}
|
||||
}
|
||||
|
@ -33,4 +33,8 @@ package javax.swing.plaf;
|
||||
*/
|
||||
|
||||
public abstract class SeparatorUI extends ComponentUI {
|
||||
/**
|
||||
* Constructor for subclasses to call.
|
||||
*/
|
||||
protected SeparatorUI() {}
|
||||
}
|
||||
|
@ -31,4 +31,8 @@ package javax.swing.plaf;
|
||||
* @author Hans Muller
|
||||
*/
|
||||
public abstract class SliderUI extends ComponentUI {
|
||||
/**
|
||||
* Constructor for subclasses to call.
|
||||
*/
|
||||
protected SliderUI() {}
|
||||
}
|
||||
|
@ -33,4 +33,8 @@ package javax.swing.plaf;
|
||||
* @since 1.4
|
||||
*/
|
||||
public abstract class SpinnerUI extends javax.swing.plaf.ComponentUI {
|
||||
/**
|
||||
* Constructor for subclasses to call.
|
||||
*/
|
||||
protected SpinnerUI() {}
|
||||
}
|
||||
|
@ -35,6 +35,11 @@ import java.awt.Graphics;
|
||||
*/
|
||||
public abstract class SplitPaneUI extends ComponentUI
|
||||
{
|
||||
/**
|
||||
* Constructor for subclasses to call.
|
||||
*/
|
||||
protected SplitPaneUI() {}
|
||||
|
||||
/**
|
||||
* Messaged to relayout the JSplitPane based on the preferred size
|
||||
* of the children components.
|
||||
|
@ -35,6 +35,11 @@ import javax.swing.JTabbedPane;
|
||||
* @author Amy Fowler
|
||||
*/
|
||||
public abstract class TabbedPaneUI extends ComponentUI {
|
||||
/**
|
||||
* Constructor for subclasses to call.
|
||||
*/
|
||||
protected TabbedPaneUI() {}
|
||||
|
||||
/**
|
||||
* Returns the tab for the coordinate.
|
||||
* @param pane the pane
|
||||
|
@ -31,4 +31,8 @@ package javax.swing.plaf;
|
||||
* @author Alan Chung
|
||||
*/
|
||||
public abstract class TableHeaderUI extends ComponentUI {
|
||||
/**
|
||||
* Constructor for subclasses to call.
|
||||
*/
|
||||
protected TableHeaderUI() {}
|
||||
}
|
||||
|
@ -31,4 +31,8 @@ package javax.swing.plaf;
|
||||
* @author Alan Chung
|
||||
*/
|
||||
public abstract class TableUI extends ComponentUI {
|
||||
/**
|
||||
* Constructor for subclasses to call.
|
||||
*/
|
||||
protected TableUI() {}
|
||||
}
|
||||
|
@ -37,6 +37,11 @@ import javax.swing.text.*;
|
||||
*/
|
||||
public abstract class TextUI extends ComponentUI
|
||||
{
|
||||
/**
|
||||
* Constructor for subclasses to call.
|
||||
*/
|
||||
protected TextUI() {}
|
||||
|
||||
/**
|
||||
* Converts the given location in the model to a place in
|
||||
* the view coordinate system.
|
||||
|
@ -35,4 +35,8 @@ import javax.swing.JToolBar;
|
||||
*/
|
||||
|
||||
public abstract class ToolBarUI extends ComponentUI {
|
||||
/**
|
||||
* Constructor for subclasses to call.
|
||||
*/
|
||||
protected ToolBarUI() {}
|
||||
}
|
||||
|
@ -31,4 +31,8 @@ package javax.swing.plaf;
|
||||
* @author Dave Moore
|
||||
*/
|
||||
public abstract class ToolTipUI extends ComponentUI {
|
||||
/**
|
||||
* Constructor for subclasses to call.
|
||||
*/
|
||||
protected ToolTipUI() {}
|
||||
}
|
||||
|
@ -37,6 +37,11 @@ import javax.swing.tree.TreePath;
|
||||
*/
|
||||
public abstract class TreeUI extends ComponentUI
|
||||
{
|
||||
/**
|
||||
* Constructor for subclasses to call.
|
||||
*/
|
||||
protected TreeUI() {}
|
||||
|
||||
/**
|
||||
* Returns the Rectangle enclosing the label portion that the
|
||||
* last item in path will be drawn into. Will return null if
|
||||
|
@ -32,4 +32,8 @@ package javax.swing.plaf;
|
||||
* @author Rich Schiavi
|
||||
*/
|
||||
public abstract class ViewportUI extends ComponentUI {
|
||||
/**
|
||||
* Constructor for subclasses to call.
|
||||
*/
|
||||
protected ViewportUI() {}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user