< prev index next >

src/java.desktop/share/classes/javax/swing/plaf/basic/BasicTableUI.java

Print this page




1394         return getHandler();
1395     }
1396 
1397 //
1398 //  The installation/uninstall procedures and support
1399 //
1400 
1401     /**
1402      * Returns a new instance of {@code BasicTableUI}.
1403      *
1404      * @param c a component
1405      * @return a new instance of {@code BasicTableUI}
1406      */
1407     public static ComponentUI createUI(JComponent c) {
1408         return new BasicTableUI();
1409     }
1410 
1411 //  Installation
1412 
1413     public void installUI(JComponent c) {


1414         table = (JTable)c;
1415 
1416         rendererPane = new CellRendererPane();
1417         table.add(rendererPane);
1418         installDefaults();
1419         installDefaults2();
1420         installListeners();
1421         installKeyboardActions();
1422     }
1423 
1424     /**
1425      * Initialize JTable properties, e.g. font, foreground, and background.
1426      * The font, foreground, and background properties are only set if their
1427      * current value is either null or a UIResource, other properties are set
1428      * if the current value is null.
1429      *
1430      * @see #installUI
1431      */
1432     protected void installDefaults() {
1433         LookAndFeel.installColorsAndFont(table, "Table.background",




1394         return getHandler();
1395     }
1396 
1397 //
1398 //  The installation/uninstall procedures and support
1399 //
1400 
1401     /**
1402      * Returns a new instance of {@code BasicTableUI}.
1403      *
1404      * @param c a component
1405      * @return a new instance of {@code BasicTableUI}
1406      */
1407     public static ComponentUI createUI(JComponent c) {
1408         return new BasicTableUI();
1409     }
1410 
1411 //  Installation
1412 
1413     public void installUI(JComponent c) {
1414         super.installUI(c);
1415 
1416         table = (JTable)c;
1417 
1418         rendererPane = new CellRendererPane();
1419         table.add(rendererPane);
1420         installDefaults();
1421         installDefaults2();
1422         installListeners();
1423         installKeyboardActions();
1424     }
1425 
1426     /**
1427      * Initialize JTable properties, e.g. font, foreground, and background.
1428      * The font, foreground, and background properties are only set if their
1429      * current value is either null or a UIResource, other properties are set
1430      * if the current value is null.
1431      *
1432      * @see #installUI
1433      */
1434     protected void installDefaults() {
1435         LookAndFeel.installColorsAndFont(table, "Table.background",


< prev index next >