当前位置: 首页>>代码示例>>Java>>正文


Java TableUI类代码示例

本文整理汇总了Java中javax.swing.plaf.TableUI的典型用法代码示例。如果您正苦于以下问题:Java TableUI类的具体用法?Java TableUI怎么用?Java TableUI使用的例子?那么, 这里精选的类代码示例或许可以为您提供帮助。


TableUI类属于javax.swing.plaf包,在下文中一共展示了TableUI类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。

示例1: setUI

import javax.swing.plaf.TableUI; //导入依赖的package包/类
@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();
    }
  }
}
 
开发者ID:Qualtagh,项目名称:JBroTable,代码行数:18,代码来源:JBroTable.java

示例2: getUI

import javax.swing.plaf.TableUI; //导入依赖的package包/类
/**
 * Maps {@code JTable.getUI()} through queue
 */
public TableUI getUI() {
    return (runMapping(new MapAction<TableUI>("getUI") {
        @Override
        public TableUI map() {
            return ((JTable) getSource()).getUI();
        }
    }));
}
 
开发者ID:AdoptOpenJDK,项目名称:openjdk-jdk10,代码行数:12,代码来源:JTableOperator.java

示例3: setUI

import javax.swing.plaf.TableUI; //导入依赖的package包/类
/**
 * 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);
        }
    });
}
 
开发者ID:AdoptOpenJDK,项目名称:openjdk-jdk10,代码行数:12,代码来源:JTableOperator.java

示例4: setUI

import javax.swing.plaf.TableUI; //导入依赖的package包/类
/**
 * 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();
}
 
开发者ID:vilie,项目名称:javify,代码行数:14,代码来源:JTable.java

示例5: setUI

import javax.swing.plaf.TableUI; //导入依赖的package包/类
/**
 * 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));
}
 
开发者ID:jskierbi,项目名称:intellij-ce-playground,代码行数:36,代码来源:PropertyInspectorTable.java

示例6: updateUI

import javax.swing.plaf.TableUI; //导入依赖的package包/类
public void updateUI() {
	// Update the UI of the table header
	if (tableHeader != null && tableHeader.getParent() == null) {
		tableHeader.updateUI();
	}

	setUI((TableUI) UIManager.getUI(this));
}
 
开发者ID:ujmp,项目名称:universal-java-matrix-package,代码行数:9,代码来源:JTable64.java

示例7: testGetSetUpdateUI

import javax.swing.plaf.TableUI; //导入依赖的package包/类
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());
}
 
开发者ID:shannah,项目名称:cn1,代码行数:9,代码来源:JTableTest.java

示例8: setUI

import javax.swing.plaf.TableUI; //导入依赖的package包/类
/**
 * 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);
}
 
开发者ID:JabRef,项目名称:jabref,代码行数:14,代码来源:MainTable.java

示例9: setUI

import javax.swing.plaf.TableUI; //导入依赖的package包/类
/**
 * 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));
}
 
开发者ID:consulo,项目名称:consulo-ui-designer,代码行数:38,代码来源:PropertyInspectorTable.java

示例10: setUI

import javax.swing.plaf.TableUI; //导入依赖的package包/类
@Override
public void setUI(TableUI ui) {
    super.setUI(ui);
    renderer = null;
    sheetCellEditor = null;
}
 
开发者ID:apache,项目名称:incubator-netbeans,代码行数:7,代码来源:SheetTable.java

示例11: setUI

import javax.swing.plaf.TableUI; //导入依赖的package包/类
public void setUI(TableUI ui) {
    needCalcRowHeight = true;
    inSetUI = true;
    super.setUI(ui);
    inSetUI = false;
}
 
开发者ID:apache,项目名称:incubator-netbeans,代码行数:7,代码来源:BaseTable.java

示例12: setUI

import javax.swing.plaf.TableUI; //导入依赖的package包/类
@Override
public void setUI( TableUI ui ) {
    super.setUI( new TabTableUI() );
}
 
开发者ID:apache,项目名称:incubator-netbeans,代码行数:5,代码来源:TabTable.java

示例13: setUI

import javax.swing.plaf.TableUI; //导入依赖的package包/类
@Override
public void setUI( TableUI ui ) {
    super.setUI( new TaskListTableUI() );
    setTableHeader( createDefaultTableHeader() );
}
 
开发者ID:apache,项目名称:incubator-netbeans,代码行数:6,代码来源:TaskListTable.java

示例14: getUI

import javax.swing.plaf.TableUI; //导入依赖的package包/类
public TableUI getUI() {
	AndroidClassUtil.callEmptyMethod();
	return null;
}
 
开发者ID:javalovercn,项目名称:j2se_for_android,代码行数:5,代码来源:JTable.java

示例15: setUI

import javax.swing.plaf.TableUI; //导入依赖的package包/类
public void setUI(TableUI ui) {
	AndroidClassUtil.callEmptyMethod();
}
 
开发者ID:javalovercn,项目名称:j2se_for_android,代码行数:4,代码来源:JTable.java


注:本文中的javax.swing.plaf.TableUI类示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。