Interface LAFProvider

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 LAFProviders at runtime.

Since:
1.0
  • Field Details

  • Method Details

    • getManager

      static ServiceManager<LAFProvider> getManager()
      Returns:
      the ServiceManager instance for the LAFProvider
    • getComponent

      default java.awt.Component getComponent​(java.lang.Class<?> cls)
      Tries to create a new Component object based on the given component type. This method should return null 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 a Component 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