Java 类javax.swing.plaf.TableUI 实例源码

项目:JBroTable    文件:JBroTable.java   
@Override
public void setUI( TableUI ui ) {
  JBroTableUI oldUI = getUI();
  if ( oldUI != null || ui instanceof JBroTableUI ) {
    super.setUI( ui );
    if ( !( ui instanceof JBroTableUI ) ) {
      if ( ui != null )
        ui.uninstallUI( this );
      this.ui = oldUI;
      oldUI.setNoDefaults( true );
      oldUI.installUI( this );
      oldUI.setNoDefaults( false );
      firePropertyChange( "UI", ui, oldUI );
      refresh();
    }
  }
}
项目:openjdk-jdk10    文件:JTableOperator.java   
/**
 * Maps {@code JTable.getUI()} through queue
 */
public TableUI getUI() {
    return (runMapping(new MapAction<TableUI>("getUI") {
        @Override
        public TableUI map() {
            return ((JTable) getSource()).getUI();
        }
    }));
}
项目:openjdk-jdk10    文件:JTableOperator.java   
/**
 * Maps {@code JTable.setUI(TableUI)} through queue
 */
public void setUI(final TableUI tableUI) {
    runMapping(new MapVoidAction("setUI") {
        @Override
        public void map() {
            ((JTable) getSource()).setUI(tableUI);
        }
    });
}
项目:openjdk9    文件:JTableOperator.java   
/**
 * Maps {@code JTable.getUI()} through queue
 */
public TableUI getUI() {
    return (runMapping(new MapAction<TableUI>("getUI") {
        @Override
        public TableUI map() {
            return ((JTable) getSource()).getUI();
        }
    }));
}
项目:openjdk9    文件:JTableOperator.java   
/**
 * Maps {@code JTable.setUI(TableUI)} through queue
 */
public void setUI(final TableUI tableUI) {
    runMapping(new MapVoidAction("setUI") {
        @Override
        public void map() {
            ((JTable) getSource()).setUI(tableUI);
        }
    });
}
项目:javify    文件:JTable.java   
/**
 * This method sets the table's UI delegate.
 *
 * @param ui The table's UI delegate.
 */
public void setUI(TableUI ui)
{
  super.setUI(ui);
  // The editors and renderers must be recreated because they constructors
  // may use the look and feel properties.
  createDefaultEditors();
  createDefaultRenderers();
}
项目:intellij-ce-playground    文件:PropertyInspectorTable.java   
/**
 * Standard JTable's UI has non convenient keybinding for
 * editing. Therefore we have to replace some standard actions.
 */
public void setUI(final TableUI ui){
  super.setUI(ui);

  // Customize action and input maps
  @NonNls final ActionMap actionMap=getActionMap();
  @NonNls final InputMap focusedInputMap=getInputMap(JComponent.WHEN_FOCUSED);
  @NonNls final InputMap ancestorInputMap=getInputMap(JComponent.WHEN_ANCESTOR_OF_FOCUSED_COMPONENT);

  actionMap.put("selectPreviousRow",new MySelectPreviousRowAction());

  actionMap.put("selectNextRow",new MySelectNextRowAction());

  actionMap.put("startEditing",new MyStartEditingAction());
  focusedInputMap.put(KeyStroke.getKeyStroke(KeyEvent.VK_F2,0),"startEditing");
  ancestorInputMap.remove(KeyStroke.getKeyStroke(KeyEvent.VK_F2,0));

  actionMap.put("smartEnter",new MyEnterAction());
  focusedInputMap.put(KeyStroke.getKeyStroke(KeyEvent.VK_ENTER,0),"smartEnter");
  ancestorInputMap.remove(KeyStroke.getKeyStroke(KeyEvent.VK_ENTER,0));

  focusedInputMap.put(KeyStroke.getKeyStroke(KeyEvent.VK_ESCAPE,0),"cancel");
  ancestorInputMap.put(KeyStroke.getKeyStroke(KeyEvent.VK_ESCAPE,0),"cancel");

  actionMap.put("expandCurrent", new MyExpandCurrentAction(true));
  focusedInputMap.put(KeyStroke.getKeyStroke(KeyEvent.VK_ADD,0),"expandCurrent");
  ancestorInputMap.remove(KeyStroke.getKeyStroke(KeyEvent.VK_ADD,0));

  actionMap.put("collapseCurrent", new MyExpandCurrentAction(false));
  focusedInputMap.put(KeyStroke.getKeyStroke(KeyEvent.VK_SUBTRACT,0),"collapseCurrent");
  ancestorInputMap.remove(KeyStroke.getKeyStroke(KeyEvent.VK_SUBTRACT,0));
}
项目:jvm-stm    文件:JTable.java   
/**
 * This method sets the table's UI delegate.
 *
 * @param ui The table's UI delegate.
 */
public void setUI(TableUI ui)
{
  super.setUI(ui);
  // The editors and renderers must be recreated because they constructors
  // may use the look and feel properties.
  createDefaultEditors();
  createDefaultRenderers();
}
项目:universal-java-matrix-package    文件:JTable64.java   
public void updateUI() {
    // Update the UI of the table header
    if (tableHeader != null && tableHeader.getParent() == null) {
        tableHeader.updateUI();
    }

    setUI((TableUI) UIManager.getUI(this));
}
项目:cn1    文件:JTableTest.java   
public void testGetSetUpdateUI() throws Exception {
    assertTrue(table.getUI() instanceof BasicTableUI);
    TableUI ui = new BasicTableUI();
    table.setUI(ui);
    assertSame(ui, table.getUI());
    table.updateUI();
    assertNotSame(ui, table.getUI());
}
项目:JamVM-PH    文件:JTable.java   
/**
 * This method sets the table's UI delegate.
 *
 * @param ui The table's UI delegate.
 */
public void setUI(TableUI ui)
{
  super.setUI(ui);
  // The editors and renderers must be recreated because they constructors
  // may use the look and feel properties.
  createDefaultEditors();
  createDefaultRenderers();
}
项目:jabref    文件:MainTable.java   
/**
 * Morten Alver: This override is a workaround NullPointerException when
 * dragging stuff into the table. I found this in a forum, but have no idea
 * why it works.
 * @param newUI
 */
@Override
public void setUI(TableUI newUI) {
    super.setUI(newUI);
    TransferHandler handler = getTransferHandler();
    setTransferHandler(null);
    setTransferHandler(handler);
}
项目:tools-idea    文件:PropertyInspectorTable.java   
/**
 * Standard JTable's UI has non convenient keybinding for
 * editing. Therefore we have to replace some standard actions.
 */
public void setUI(final TableUI ui){
  super.setUI(ui);

  // Customize action and input maps
  @NonNls final ActionMap actionMap=getActionMap();
  @NonNls final InputMap focusedInputMap=getInputMap(JComponent.WHEN_FOCUSED);
  @NonNls final InputMap ancestorInputMap=getInputMap(JComponent.WHEN_ANCESTOR_OF_FOCUSED_COMPONENT);

  actionMap.put("selectPreviousRow",new MySelectPreviousRowAction());

  actionMap.put("selectNextRow",new MySelectNextRowAction());

  actionMap.put("startEditing",new MyStartEditingAction());
  focusedInputMap.put(KeyStroke.getKeyStroke(KeyEvent.VK_F2,0),"startEditing");
  ancestorInputMap.remove(KeyStroke.getKeyStroke(KeyEvent.VK_F2,0));

  actionMap.put("smartEnter",new MyEnterAction());
  focusedInputMap.put(KeyStroke.getKeyStroke(KeyEvent.VK_ENTER,0),"smartEnter");
  ancestorInputMap.remove(KeyStroke.getKeyStroke(KeyEvent.VK_ENTER,0));

  focusedInputMap.put(KeyStroke.getKeyStroke(KeyEvent.VK_ESCAPE,0),"cancel");
  ancestorInputMap.put(KeyStroke.getKeyStroke(KeyEvent.VK_ESCAPE,0),"cancel");

  actionMap.put("expandCurrent", new MyExpandCurrentAction(true));
  focusedInputMap.put(KeyStroke.getKeyStroke(KeyEvent.VK_ADD,0),"expandCurrent");
  ancestorInputMap.remove(KeyStroke.getKeyStroke(KeyEvent.VK_ADD,0));

  actionMap.put("collapseCurrent", new MyExpandCurrentAction(false));
  focusedInputMap.put(KeyStroke.getKeyStroke(KeyEvent.VK_SUBTRACT,0),"collapseCurrent");
  ancestorInputMap.remove(KeyStroke.getKeyStroke(KeyEvent.VK_SUBTRACT,0));
}
项目:classpath    文件:JTable.java   
/**
 * This method sets the table's UI delegate.
 *
 * @param ui The table's UI delegate.
 */
public void setUI(TableUI ui)
{
  super.setUI(ui);
  // The editors and renderers must be recreated because they constructors
  // may use the look and feel properties.
  createDefaultEditors();
  createDefaultRenderers();
}
项目:freeVM    文件:JTableTest.java   
public void testGetSetUpdateUI() throws Exception {
    assertTrue(table.getUI() instanceof BasicTableUI);
    TableUI ui = new BasicTableUI();
    table.setUI(ui);
    assertSame(ui, table.getUI());
    table.updateUI();
    assertNotSame(ui, table.getUI());
}
项目:freeVM    文件:JTableTest.java   
public void testGetSetUpdateUI() throws Exception {
    assertTrue(table.getUI() instanceof BasicTableUI);
    TableUI ui = new BasicTableUI();
    table.setUI(ui);
    assertSame(ui, table.getUI());
    table.updateUI();
    assertNotSame(ui, table.getUI());
}
项目:consulo-ui-designer    文件:PropertyInspectorTable.java   
/**
 * Standard JTable's UI has non convenient keybinding for
 * editing. Therefore we have to replace some standard actions.
 */
@Override
public void setUI(final TableUI ui)
{
    super.setUI(ui);

    // Customize action and input maps
    @NonNls final ActionMap actionMap = getActionMap();
    @NonNls final InputMap focusedInputMap = getInputMap(JComponent.WHEN_FOCUSED);
    @NonNls final InputMap ancestorInputMap = getInputMap(JComponent.WHEN_ANCESTOR_OF_FOCUSED_COMPONENT);

    actionMap.put("selectPreviousRow", new MySelectPreviousRowAction());

    actionMap.put("selectNextRow", new MySelectNextRowAction());

    actionMap.put("startEditing", new MyStartEditingAction());
    focusedInputMap.put(KeyStroke.getKeyStroke(KeyEvent.VK_F2, 0), "startEditing");
    ancestorInputMap.remove(KeyStroke.getKeyStroke(KeyEvent.VK_F2, 0));

    actionMap.put("smartEnter", new MyEnterAction());
    focusedInputMap.put(KeyStroke.getKeyStroke(KeyEvent.VK_ENTER, 0), "smartEnter");
    ancestorInputMap.remove(KeyStroke.getKeyStroke(KeyEvent.VK_ENTER, 0));

    focusedInputMap.put(KeyStroke.getKeyStroke(KeyEvent.VK_ESCAPE, 0), "cancel");
    ancestorInputMap.put(KeyStroke.getKeyStroke(KeyEvent.VK_ESCAPE, 0), "cancel");

    actionMap.put("expandCurrent", new MyExpandCurrentAction(true));
    focusedInputMap.put(KeyStroke.getKeyStroke(KeyEvent.VK_ADD, 0), "expandCurrent");
    ancestorInputMap.remove(KeyStroke.getKeyStroke(KeyEvent.VK_ADD, 0));

    actionMap.put("collapseCurrent", new MyExpandCurrentAction(false));
    focusedInputMap.put(KeyStroke.getKeyStroke(KeyEvent.VK_SUBTRACT, 0), "collapseCurrent");
    ancestorInputMap.remove(KeyStroke.getKeyStroke(KeyEvent.VK_SUBTRACT, 0));
}
项目:incubator-netbeans    文件:SheetTable.java   
@Override
public void setUI(TableUI ui) {
    super.setUI(ui);
    renderer = null;
    sheetCellEditor = null;
}
项目:incubator-netbeans    文件:BaseTable.java   
public void setUI(TableUI ui) {
    needCalcRowHeight = true;
    inSetUI = true;
    super.setUI(ui);
    inSetUI = false;
}
项目:incubator-netbeans    文件:TabTable.java   
@Override
public void setUI( TableUI ui ) {
    super.setUI( new TabTableUI() );
}
项目:incubator-netbeans    文件:TaskListTable.java   
@Override
public void setUI( TableUI ui ) {
    super.setUI( new TaskListTableUI() );
    setTableHeader( createDefaultTableHeader() );
}
项目:j2se_for_android    文件:JTable.java   
public TableUI getUI() {
    AndroidClassUtil.callEmptyMethod();
    return null;
}
项目:j2se_for_android    文件:JTable.java   
public void setUI(TableUI ui) {
    AndroidClassUtil.callEmptyMethod();
}
项目:javify    文件:JTable.java   
public void updateUI()
{
  setUI((TableUI) UIManager.getUI(this));
}
项目:intellij-ce-playground    文件:PropertyTable.java   
public void setUI(TableUI ui) {
  super.setUI(ui);

  // Customize action and input maps
  ActionMap actionMap = getActionMap();

  setFocusTraversalKeys(
    KeyboardFocusManager.FORWARD_TRAVERSAL_KEYS,
    KeyboardFocusManager.getCurrentKeyboardFocusManager().getDefaultFocusTraversalKeys(KeyboardFocusManager.FORWARD_TRAVERSAL_KEYS));
  setFocusTraversalKeys(
    KeyboardFocusManager.BACKWARD_TRAVERSAL_KEYS,
    KeyboardFocusManager.getCurrentKeyboardFocusManager().getDefaultFocusTraversalKeys(KeyboardFocusManager.BACKWARD_TRAVERSAL_KEYS));

  InputMap focusedInputMap = getInputMap(JComponent.WHEN_FOCUSED);
  InputMap ancestorInputMap = getInputMap(JComponent.WHEN_ANCESTOR_OF_FOCUSED_COMPONENT);

  actionMap.put("selectPreviousRow", new MySelectNextPreviousRowAction(false));
  actionMap.put("selectNextRow", new MySelectNextPreviousRowAction(true));

  actionMap.put("startEditing", new MyStartEditingAction());
  focusedInputMap.put(KeyStroke.getKeyStroke(KeyEvent.VK_F2, 0), "startEditing");
  ancestorInputMap.remove(KeyStroke.getKeyStroke(KeyEvent.VK_F2, 0));

  actionMap.put("smartEnter", new MyEnterAction());
  focusedInputMap.put(KeyStroke.getKeyStroke(KeyEvent.VK_ENTER, 0), "smartEnter");
  ancestorInputMap.remove(KeyStroke.getKeyStroke(KeyEvent.VK_ENTER, 0));

  focusedInputMap.put(KeyStroke.getKeyStroke(KeyEvent.VK_ESCAPE, 0), "cancel");
  ancestorInputMap.put(KeyStroke.getKeyStroke(KeyEvent.VK_ESCAPE, 0), "cancel");

  actionMap.put("restoreDefault", new MyRestoreDefaultAction());
  focusedInputMap.put(KeyStroke.getKeyStroke(KeyEvent.VK_DELETE, 0), "restoreDefault");
  ancestorInputMap.put(KeyStroke.getKeyStroke(KeyEvent.VK_DELETE, 0), "restoreDefault");
  focusedInputMap.put(KeyStroke.getKeyStroke(KeyEvent.VK_BACK_SPACE, 0), "restoreDefault");
  ancestorInputMap.put(KeyStroke.getKeyStroke(KeyEvent.VK_BACK_SPACE, 0), "restoreDefault");

  actionMap.put("expandCurrent", new MyExpandCurrentAction(true, false));
  focusedInputMap.put(KeyStroke.getKeyStroke(KeyEvent.VK_ADD, 0), "expandCurrent");
  ancestorInputMap.remove(KeyStroke.getKeyStroke(KeyEvent.VK_ADD, 0));

  actionMap.put("expandCurrentRight", new MyExpandCurrentAction(true, true));
  focusedInputMap.put(KeyStroke.getKeyStroke(KeyEvent.VK_RIGHT, 0), "expandCurrentRight");
  ancestorInputMap.remove(KeyStroke.getKeyStroke(KeyEvent.VK_RIGHT, 0));
  focusedInputMap.put(KeyStroke.getKeyStroke(KeyEvent.VK_KP_RIGHT, 0), "expandCurrentRight");
  ancestorInputMap.remove(KeyStroke.getKeyStroke(KeyEvent.VK_KP_RIGHT, 0));

  actionMap.put("collapseCurrent", new MyExpandCurrentAction(false, false));
  focusedInputMap.put(KeyStroke.getKeyStroke(KeyEvent.VK_SUBTRACT, 0), "collapseCurrent");
  ancestorInputMap.remove(KeyStroke.getKeyStroke(KeyEvent.VK_SUBTRACT, 0));

  actionMap.put("collapseCurrentLeft", new MyExpandCurrentAction(false, true));
  focusedInputMap.put(KeyStroke.getKeyStroke(KeyEvent.VK_LEFT, 0), "collapseCurrentLeft");
  ancestorInputMap.remove(KeyStroke.getKeyStroke(KeyEvent.VK_LEFT, 0));
  focusedInputMap.put(KeyStroke.getKeyStroke(KeyEvent.VK_KP_LEFT, 0), "collapseCurrentLeft");
  ancestorInputMap.remove(KeyStroke.getKeyStroke(KeyEvent.VK_KP_LEFT, 0));
}
项目:jvm-stm    文件:JTable.java   
public void updateUI()
{
  setUI((TableUI) UIManager.getUI(this));
}
项目:cn1    文件:JTable.java   
public TableUI getUI() {
    return (TableUI) ui;
}
项目:cn1    文件:JTable.java   
public void setUI(TableUI ui) {
    super.setUI(ui);
}
项目:cn1    文件:JTable.java   
@Override
public void updateUI() {
    setUI((TableUI) UIManager.getUI(this));
}
项目:JamVM-PH    文件:JTable.java   
public void updateUI()
{
  setUI((TableUI) UIManager.getUI(this));
}
项目:tools-idea    文件:PropertyTable.java   
public void setUI(TableUI ui) {
  super.setUI(ui);

  // Customize action and input maps
  ActionMap actionMap = getActionMap();

  setFocusTraversalKeys(
    KeyboardFocusManager.FORWARD_TRAVERSAL_KEYS,
    KeyboardFocusManager.getCurrentKeyboardFocusManager().getDefaultFocusTraversalKeys(KeyboardFocusManager.FORWARD_TRAVERSAL_KEYS));
  setFocusTraversalKeys(
    KeyboardFocusManager.BACKWARD_TRAVERSAL_KEYS,
    KeyboardFocusManager.getCurrentKeyboardFocusManager().getDefaultFocusTraversalKeys(KeyboardFocusManager.BACKWARD_TRAVERSAL_KEYS));

  InputMap focusedInputMap = getInputMap(JComponent.WHEN_FOCUSED);
  InputMap ancestorInputMap = getInputMap(JComponent.WHEN_ANCESTOR_OF_FOCUSED_COMPONENT);

  actionMap.put("selectPreviousRow", new MySelectNextPreviousRowAction(false));
  actionMap.put("selectNextRow", new MySelectNextPreviousRowAction(true));

  actionMap.put("startEditing", new MyStartEditingAction());
  focusedInputMap.put(KeyStroke.getKeyStroke(KeyEvent.VK_F2, 0), "startEditing");
  ancestorInputMap.remove(KeyStroke.getKeyStroke(KeyEvent.VK_F2, 0));

  actionMap.put("smartEnter", new MyEnterAction());
  focusedInputMap.put(KeyStroke.getKeyStroke(KeyEvent.VK_ENTER, 0), "smartEnter");
  ancestorInputMap.remove(KeyStroke.getKeyStroke(KeyEvent.VK_ENTER, 0));

  focusedInputMap.put(KeyStroke.getKeyStroke(KeyEvent.VK_ESCAPE, 0), "cancel");
  ancestorInputMap.put(KeyStroke.getKeyStroke(KeyEvent.VK_ESCAPE, 0), "cancel");

  actionMap.put("restoreDefault", new MyRestoreDefaultAction());
  focusedInputMap.put(KeyStroke.getKeyStroke(KeyEvent.VK_DELETE, 0), "restoreDefault");
  ancestorInputMap.put(KeyStroke.getKeyStroke(KeyEvent.VK_DELETE, 0), "restoreDefault");
  focusedInputMap.put(KeyStroke.getKeyStroke(KeyEvent.VK_BACK_SPACE, 0), "restoreDefault");
  ancestorInputMap.put(KeyStroke.getKeyStroke(KeyEvent.VK_BACK_SPACE, 0), "restoreDefault");

  actionMap.put("expandCurrent", new MyExpandCurrentAction(true, false));
  focusedInputMap.put(KeyStroke.getKeyStroke(KeyEvent.VK_ADD, 0), "expandCurrent");
  ancestorInputMap.remove(KeyStroke.getKeyStroke(KeyEvent.VK_ADD, 0));

  actionMap.put("expandCurrentRight", new MyExpandCurrentAction(true, true));
  focusedInputMap.put(KeyStroke.getKeyStroke(KeyEvent.VK_RIGHT, 0), "expandCurrentRight");
  ancestorInputMap.remove(KeyStroke.getKeyStroke(KeyEvent.VK_RIGHT, 0));
  focusedInputMap.put(KeyStroke.getKeyStroke(KeyEvent.VK_KP_RIGHT, 0), "expandCurrentRight");
  ancestorInputMap.remove(KeyStroke.getKeyStroke(KeyEvent.VK_KP_RIGHT, 0));

  actionMap.put("collapseCurrent", new MyExpandCurrentAction(false, false));
  focusedInputMap.put(KeyStroke.getKeyStroke(KeyEvent.VK_SUBTRACT, 0), "collapseCurrent");
  ancestorInputMap.remove(KeyStroke.getKeyStroke(KeyEvent.VK_SUBTRACT, 0));

  actionMap.put("collapseCurrentLeft", new MyExpandCurrentAction(false, true));
  focusedInputMap.put(KeyStroke.getKeyStroke(KeyEvent.VK_LEFT, 0), "collapseCurrentLeft");
  ancestorInputMap.remove(KeyStroke.getKeyStroke(KeyEvent.VK_LEFT, 0));
  focusedInputMap.put(KeyStroke.getKeyStroke(KeyEvent.VK_KP_LEFT, 0), "collapseCurrentLeft");
  ancestorInputMap.remove(KeyStroke.getKeyStroke(KeyEvent.VK_KP_LEFT, 0));
}
项目:cordovastudio    文件:PropertyTable.java   
public void setUI(TableUI ui) {
  super.setUI(ui);

  // Customize action and input maps
  ActionMap actionMap = getActionMap();

  setFocusTraversalKeys(
    KeyboardFocusManager.FORWARD_TRAVERSAL_KEYS,
    KeyboardFocusManager.getCurrentKeyboardFocusManager().getDefaultFocusTraversalKeys(KeyboardFocusManager.FORWARD_TRAVERSAL_KEYS));
  setFocusTraversalKeys(
    KeyboardFocusManager.BACKWARD_TRAVERSAL_KEYS,
    KeyboardFocusManager.getCurrentKeyboardFocusManager().getDefaultFocusTraversalKeys(KeyboardFocusManager.BACKWARD_TRAVERSAL_KEYS));

  InputMap focusedInputMap = getInputMap(JComponent.WHEN_FOCUSED);
  InputMap ancestorInputMap = getInputMap(JComponent.WHEN_ANCESTOR_OF_FOCUSED_COMPONENT);

  actionMap.put("selectPreviousRow", new MySelectNextPreviousRowAction(false));
  actionMap.put("selectNextRow", new MySelectNextPreviousRowAction(true));

  actionMap.put("startEditing", new MyStartEditingAction());
  focusedInputMap.put(KeyStroke.getKeyStroke(KeyEvent.VK_F2, 0), "startEditing");
  ancestorInputMap.remove(KeyStroke.getKeyStroke(KeyEvent.VK_F2, 0));

  actionMap.put("smartEnter", new MyEnterAction());
  focusedInputMap.put(KeyStroke.getKeyStroke(KeyEvent.VK_ENTER, 0), "smartEnter");
  ancestorInputMap.remove(KeyStroke.getKeyStroke(KeyEvent.VK_ENTER, 0));

  focusedInputMap.put(KeyStroke.getKeyStroke(KeyEvent.VK_ESCAPE, 0), "cancel");
  ancestorInputMap.put(KeyStroke.getKeyStroke(KeyEvent.VK_ESCAPE, 0), "cancel");

  actionMap.put("restoreDefault", new MyRestoreDefaultAction());
  focusedInputMap.put(KeyStroke.getKeyStroke(KeyEvent.VK_DELETE, 0), "restoreDefault");
  ancestorInputMap.put(KeyStroke.getKeyStroke(KeyEvent.VK_DELETE, 0), "restoreDefault");
  focusedInputMap.put(KeyStroke.getKeyStroke(KeyEvent.VK_BACK_SPACE, 0), "restoreDefault");
  ancestorInputMap.put(KeyStroke.getKeyStroke(KeyEvent.VK_BACK_SPACE, 0), "restoreDefault");

  actionMap.put("expandCurrent", new MyExpandCurrentAction(true, false));
  focusedInputMap.put(KeyStroke.getKeyStroke(KeyEvent.VK_ADD, 0), "expandCurrent");
  ancestorInputMap.remove(KeyStroke.getKeyStroke(KeyEvent.VK_ADD, 0));

  actionMap.put("expandCurrentRight", new MyExpandCurrentAction(true, true));
  focusedInputMap.put(KeyStroke.getKeyStroke(KeyEvent.VK_RIGHT, 0), "expandCurrentRight");
  ancestorInputMap.remove(KeyStroke.getKeyStroke(KeyEvent.VK_RIGHT, 0));
  focusedInputMap.put(KeyStroke.getKeyStroke(KeyEvent.VK_KP_RIGHT, 0), "expandCurrentRight");
  ancestorInputMap.remove(KeyStroke.getKeyStroke(KeyEvent.VK_KP_RIGHT, 0));

  actionMap.put("collapseCurrent", new MyExpandCurrentAction(false, false));
  focusedInputMap.put(KeyStroke.getKeyStroke(KeyEvent.VK_SUBTRACT, 0), "collapseCurrent");
  ancestorInputMap.remove(KeyStroke.getKeyStroke(KeyEvent.VK_SUBTRACT, 0));

  actionMap.put("collapseCurrentLeft", new MyExpandCurrentAction(false, true));
  focusedInputMap.put(KeyStroke.getKeyStroke(KeyEvent.VK_LEFT, 0), "collapseCurrentLeft");
  ancestorInputMap.remove(KeyStroke.getKeyStroke(KeyEvent.VK_LEFT, 0));
  focusedInputMap.put(KeyStroke.getKeyStroke(KeyEvent.VK_KP_LEFT, 0), "collapseCurrentLeft");
  ancestorInputMap.remove(KeyStroke.getKeyStroke(KeyEvent.VK_KP_LEFT, 0));
}
项目:classpath    文件:JTable.java   
public void updateUI()
{
  setUI((TableUI) UIManager.getUI(this));
}
项目:freeVM    文件:JTable.java   
public TableUI getUI() {
    return (TableUI) ui;
}
项目:freeVM    文件:JTable.java   
public void setUI(TableUI ui) {
    super.setUI(ui);
}
项目:freeVM    文件:JTable.java   
@Override
public void updateUI() {
    setUI((TableUI) UIManager.getUI(this));
}
项目:freeVM    文件:JTable.java   
public TableUI getUI() {
    return (TableUI) ui;
}
项目:freeVM    文件:JTable.java   
public void setUI(TableUI ui) {
    super.setUI(ui);
}
项目:freeVM    文件:JTable.java   
@Override
public void updateUI() {
    setUI((TableUI) UIManager.getUI(this));
}
项目:consulo    文件:PropertyTable.java   
public void setUI(TableUI ui) {
  super.setUI(ui);

  // Customize action and input maps
  ActionMap actionMap = getActionMap();

  setFocusTraversalKeys(
    KeyboardFocusManager.FORWARD_TRAVERSAL_KEYS,
    KeyboardFocusManager.getCurrentKeyboardFocusManager().getDefaultFocusTraversalKeys(KeyboardFocusManager.FORWARD_TRAVERSAL_KEYS));
  setFocusTraversalKeys(
    KeyboardFocusManager.BACKWARD_TRAVERSAL_KEYS,
    KeyboardFocusManager.getCurrentKeyboardFocusManager().getDefaultFocusTraversalKeys(KeyboardFocusManager.BACKWARD_TRAVERSAL_KEYS));

  InputMap focusedInputMap = getInputMap(JComponent.WHEN_FOCUSED);
  InputMap ancestorInputMap = getInputMap(JComponent.WHEN_ANCESTOR_OF_FOCUSED_COMPONENT);

  actionMap.put("selectPreviousRow", new MySelectNextPreviousRowAction(false));
  actionMap.put("selectNextRow", new MySelectNextPreviousRowAction(true));

  actionMap.put("startEditing", new MyStartEditingAction());
  focusedInputMap.put(KeyStroke.getKeyStroke(KeyEvent.VK_F2, 0), "startEditing");
  ancestorInputMap.remove(KeyStroke.getKeyStroke(KeyEvent.VK_F2, 0));

  actionMap.put("smartEnter", new MyEnterAction());
  focusedInputMap.put(KeyStroke.getKeyStroke(KeyEvent.VK_ENTER, 0), "smartEnter");
  ancestorInputMap.remove(KeyStroke.getKeyStroke(KeyEvent.VK_ENTER, 0));

  focusedInputMap.put(KeyStroke.getKeyStroke(KeyEvent.VK_ESCAPE, 0), "cancel");
  ancestorInputMap.put(KeyStroke.getKeyStroke(KeyEvent.VK_ESCAPE, 0), "cancel");

  actionMap.put("restoreDefault", new MyRestoreDefaultAction());
  focusedInputMap.put(KeyStroke.getKeyStroke(KeyEvent.VK_DELETE, 0), "restoreDefault");
  ancestorInputMap.put(KeyStroke.getKeyStroke(KeyEvent.VK_DELETE, 0), "restoreDefault");
  focusedInputMap.put(KeyStroke.getKeyStroke(KeyEvent.VK_BACK_SPACE, 0), "restoreDefault");
  ancestorInputMap.put(KeyStroke.getKeyStroke(KeyEvent.VK_BACK_SPACE, 0), "restoreDefault");

  actionMap.put("expandCurrent", new MyExpandCurrentAction(true, false));
  focusedInputMap.put(KeyStroke.getKeyStroke(KeyEvent.VK_ADD, 0), "expandCurrent");
  ancestorInputMap.remove(KeyStroke.getKeyStroke(KeyEvent.VK_ADD, 0));

  actionMap.put("expandCurrentRight", new MyExpandCurrentAction(true, true));
  focusedInputMap.put(KeyStroke.getKeyStroke(KeyEvent.VK_RIGHT, 0), "expandCurrentRight");
  ancestorInputMap.remove(KeyStroke.getKeyStroke(KeyEvent.VK_RIGHT, 0));
  focusedInputMap.put(KeyStroke.getKeyStroke(KeyEvent.VK_KP_RIGHT, 0), "expandCurrentRight");
  ancestorInputMap.remove(KeyStroke.getKeyStroke(KeyEvent.VK_KP_RIGHT, 0));

  actionMap.put("collapseCurrent", new MyExpandCurrentAction(false, false));
  focusedInputMap.put(KeyStroke.getKeyStroke(KeyEvent.VK_SUBTRACT, 0), "collapseCurrent");
  ancestorInputMap.remove(KeyStroke.getKeyStroke(KeyEvent.VK_SUBTRACT, 0));

  actionMap.put("collapseCurrentLeft", new MyExpandCurrentAction(false, true));
  focusedInputMap.put(KeyStroke.getKeyStroke(KeyEvent.VK_LEFT, 0), "collapseCurrentLeft");
  ancestorInputMap.remove(KeyStroke.getKeyStroke(KeyEvent.VK_LEFT, 0));
  focusedInputMap.put(KeyStroke.getKeyStroke(KeyEvent.VK_KP_LEFT, 0), "collapseCurrentLeft");
  ancestorInputMap.remove(KeyStroke.getKeyStroke(KeyEvent.VK_KP_LEFT, 0));
}