- All Known Implementing Classes:
DefaultLAFProvider
public interface LAFProvider
The base class for all LookAndFeel providers that implement own versions of
the components listed below. This provider will function as a wrapper that
is used within the generation process in order to create the needed component
instances.
If the component type declared in the GUI class is not found within this
provider, the method getComponent(Class)
is called to retrieve
an instance for the defined type. This method returns null on failure and
should not throw any errors.
This provider acts as a service which will be loaded through the LAFManager
class. Therefore, it is possible to implement and use different LAFProvider
s
at runtime.
- Since:
- 1.0
-
Field Summary
Fields Modifier and Type Field Description static ServiceManager<LAFProvider>
MANAGER
In order to make it possible to have multipleLAFProvider
instances registered to the system, this manager is used. -
Method Summary
Modifier and Type Method Description default javax.swing.JColorChooser
getColorChooser()
default java.awt.Component
getComponent(java.lang.Class<?> cls)
Tries to create a newComponent
object based on the given component type.default javax.swing.JFileChooser
getFileChooser()
default java.awt.Frame
getFrame()
default javax.swing.JButton
getJButton()
default javax.swing.JCheckBox
getJCheckBox()
default javax.swing.JCheckBoxMenuItem
getJCheckBoxMenuItem()
default <E> javax.swing.JComboBox<E>
getJComboBox()
default javax.swing.JDesktopPane
getJDesktopPane()
default javax.swing.JDialog
getJDialog()
default javax.swing.JFormattedTextField
getJFormattedTextField()
default javax.swing.JFrame
getJFrame()
default javax.swing.JInternalFrame
getJInternalFrame()
default javax.swing.JLabel
getJLabel()
default <E> javax.swing.JList<E>
getJList()
default javax.swing.JMenu
getJMenu()
default javax.swing.JMenuBar
getJMenuBar()
default javax.swing.JMenuItem
getJMenuItem()
default javax.swing.JPanel
getJPanel()
default javax.swing.JPasswordField
getJPasswordField()
default javax.swing.JPopupMenu
getJPopupMenu()
default javax.swing.JProgressBar
getJProgressBar()
default javax.swing.JRadioButton
getJRadioButton()
default javax.swing.JRadioButtonMenuItem
getJRadioButtonMenuItem()
default javax.swing.JScrollBar
getJScrollBar()
default javax.swing.JScrollPane
getJScrollPane()
default javax.swing.JSeparator
getJSeparator()
default javax.swing.JSpinner
getJSpinner()
default javax.swing.JSplitPane
getJSplitPane()
default javax.swing.JTabbedPane
getJTabbedPane()
default javax.swing.JTable
getJTable()
default javax.swing.JTextArea
getJTextArea()
default javax.swing.JTextField
getJTextField()
default javax.swing.JTextPane
getJTextPane()
default javax.swing.JToggleButton
getJToggleButton()
default javax.swing.JToolBar
getJToolBar()
default javax.swing.JTree
getJTree()
static ServiceManager<LAFProvider>
getManager()
-
Field Details
-
MANAGER
In order to make it possible to have multipleLAFProvider
instances registered to the system, this manager is used.To register new
LAFProvider
s, they should call theServiceManager.register(Object)
function in a static context.- See Also:
ServiceManager
-
-
Method Details
-
getManager
- Returns:
- the
ServiceManager
instance for theLAFProvider
-
getComponent
default java.awt.Component getComponent(java.lang.Class<?> cls)Tries to create a newComponent
object based on the given component type. This method should returnnull
if no implementation for the given type was found or the type is not specified (e.g. abstract class).- Parameters:
cls
- the component type- Returns:
null
on failure, otherwise aComponent
object
-
getJTextField
default javax.swing.JTextField getJTextField()- Returns:
- a new
JTextField
object
-
getJSpinner
default javax.swing.JSpinner getJSpinner()- Returns:
- a new
JSpinner
object
-
getJProgressBar
default javax.swing.JProgressBar getJProgressBar()- Returns:
- a new
JProgressBar
object
-
getJTextArea
default javax.swing.JTextArea getJTextArea()- Returns:
- a new
JTextArea
object
-
getJLabel
default javax.swing.JLabel getJLabel()- Returns:
- a new
JLabel
object
-
getJSeparator
default javax.swing.JSeparator getJSeparator()- Returns:
- a new
JSeparator
object
-
getJPasswordField
default javax.swing.JPasswordField getJPasswordField()- Returns:
- a new
JPasswordField
object
-
getJFormattedTextField
default javax.swing.JFormattedTextField getJFormattedTextField()- Returns:
- a new
JFormattedTextField
object
-
getJList
default <E> javax.swing.JList<E> getJList()- Type Parameters:
E
- the type of the elements of this list- Returns:
- a new
JList
object
-
getJButton
default javax.swing.JButton getJButton()- Returns:
- a new
JButton
object
-
getJMenu
default javax.swing.JMenu getJMenu()- Returns:
- a new
JMenu
object
-
getJMenuItem
default javax.swing.JMenuItem getJMenuItem()- Returns:
- a new
JMenuItem
object
-
getJRadioButtonMenuItem
default javax.swing.JRadioButtonMenuItem getJRadioButtonMenuItem()- Returns:
- a new
JRadioButtonMenuItem
object
-
getJCheckBoxMenuItem
default javax.swing.JCheckBoxMenuItem getJCheckBoxMenuItem()- Returns:
- a new
JCheckBoxMenuItem
object
-
getJMenuBar
default javax.swing.JMenuBar getJMenuBar()- Returns:
- a new
JMenuBar
object
-
getJTextPane
default javax.swing.JTextPane getJTextPane()- Returns:
- a new
JTextPane
object
-
getJRadioButton
default javax.swing.JRadioButton getJRadioButton()- Returns:
- a new
JRadioButton
object
-
getJComboBox
default <E> javax.swing.JComboBox<E> getJComboBox()- Type Parameters:
E
- the type of the elements of this combo box- Returns:
- a new
JComboBox
object
-
getJTable
default javax.swing.JTable getJTable()- Returns:
- a new
JTable
object
-
getJToolBar
default javax.swing.JToolBar getJToolBar()- Returns:
- a new
JToolBar
object
-
getJInternalFrame
default javax.swing.JInternalFrame getJInternalFrame()- Returns:
- a new
JInternalFrame
object
-
getJFrame
default javax.swing.JFrame getJFrame()- Returns:
- a new
JFrame
object
-
getJCheckBox
default javax.swing.JCheckBox getJCheckBox()- Returns:
- a new
JCheckBox
object
-
getJPanel
default javax.swing.JPanel getJPanel()- Returns:
- a new
JPanel
object
-
getJSplitPane
default javax.swing.JSplitPane getJSplitPane()- Returns:
- a new
JSplitPane
object
-
getJTabbedPane
default javax.swing.JTabbedPane getJTabbedPane()- Returns:
- a new
JTabbedPane
object
-
getJToggleButton
default javax.swing.JToggleButton getJToggleButton()- Returns:
- a new
JToggleButton
object
-
getJScrollPane
default javax.swing.JScrollPane getJScrollPane()- Returns:
- a new
JScrollPane
object
-
getJScrollBar
default javax.swing.JScrollBar getJScrollBar()- Returns:
- a new
JScrollBar
object
-
getJPopupMenu
default javax.swing.JPopupMenu getJPopupMenu()- Returns:
- a new
JPopupMenu
object
-
getJDesktopPane
default javax.swing.JDesktopPane getJDesktopPane()- Returns:
- a new
JDesktopPane
object
-
getJTree
default javax.swing.JTree getJTree()- Returns:
- a new
JTree
object
-
getFrame
default java.awt.Frame getFrame()- Returns:
- a new
Frame
object
-
getJDialog
default javax.swing.JDialog getJDialog()- Returns:
- a new
JDialog
object
-
getFileChooser
default javax.swing.JFileChooser getFileChooser()- Returns:
- a new
JFileChooser
object
-
getColorChooser
default javax.swing.JColorChooser getColorChooser()- Returns:
- a new
JColorChooser
object
-