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


Java JBTable.setAutoResizeMode方法代码示例

本文整理汇总了Java中com.intellij.ui.table.JBTable.setAutoResizeMode方法的典型用法代码示例。如果您正苦于以下问题:Java JBTable.setAutoResizeMode方法的具体用法?Java JBTable.setAutoResizeMode怎么用?Java JBTable.setAutoResizeMode使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在com.intellij.ui.table.JBTable的用法示例。


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

示例1: createUIComponents

import com.intellij.ui.table.JBTable; //导入方法依赖的package包/类
private void createUIComponents() {
    tabbedPane = new JTabbedPane();
    table1 = new JBTable();
    table1.setFillsViewportHeight(true);
    table1.setComponentPopupMenu(createPopupMenu());
    scrollPane1 = new JBScrollPane(table1);
    table1.setAutoResizeMode(JTable.AUTO_RESIZE_OFF);
    setCellRenderer();
    btnAddNewKey = new JButton();
}
 
开发者ID:PioBeat,项目名称:GravSupport,代码行数:11,代码来源:LanguageFileEditorGUI.java

示例2: createUIComponents

import com.intellij.ui.table.JBTable; //导入方法依赖的package包/类
private void createUIComponents() {
    contexts = new JBTable(new ModuleTableModel());
    contexts.setAutoResizeMode(JTable.AUTO_RESIZE_LAST_COLUMN);
    contexts.setDefaultRenderer(String.class, new ModuleCellRenderer());
    contexts.getColumnModel().getColumn(0).setPreferredWidth(25);
    tableScrollPane = new JBScrollPane();
    tableScrollPane.setViewportView(contexts);
    tableScrollPane.setHorizontalScrollBarPolicy(JScrollPane.HORIZONTAL_SCROLLBAR_AS_NEEDED);
    tableScrollPane.setVerticalScrollBarPolicy(JScrollPane.VERTICAL_SCROLLBAR_AS_NEEDED);
    tableScrollPane.setPreferredSize(new Dimension(400, 100));
    tableScrollPane.setSize(new Dimension(400, 100));
}
 
开发者ID:vitorzachi,项目名称:tomcat-runner,代码行数:13,代码来源:TomcatRunnerConfPanel.java

示例3: setupDataSplitPane

import com.intellij.ui.table.JBTable; //导入方法依赖的package包/类
private void setupDataSplitPane(Project project) {
    RestClientService restClientService = ServiceManager.getService(project, RestClientService.class);
    SimpleNode dataRootNode = new DataExplorerRootNode(project, restClientService, "sObjects");

    SimpleTree dataTree = new SimpleTree();
    dataTree.setShowsRootHandles(true);
    SimpleTreeBuilder dataTreeBuilder = new SimpleTreeBuilder(dataTree, (DefaultTreeModel) dataTree.getModel(), new ExplorerTreeStructure(dataRootNode), null);
    Disposer.register(project, dataTreeBuilder);
    dataTree.addTreeExpansionListener(new ExplorerTreeExpansionListener(dataTreeBuilder));
    dataTree.setCellRenderer(new ExplorerCellRenderer());
    JBTable dataTable = new JBTable();
    dataTable.setStriped(true);
    dataTable.setAutoResizeMode(JTable.AUTO_RESIZE_OFF);

    // Setup left panel which will display all the available sObjects
    SimpleToolWindowPanel treePanel = new SimpleToolWindowPanel(true, true);
    ActionToolbar treeToolbar = createTreeToolbar(dataRootNode, dataTreeBuilder);
    treeToolbar.setTargetComponent(treePanel);
    treePanel.setToolbar(treeToolbar.getComponent());
    treePanel.setContent(ScrollPaneFactory.createScrollPane(dataTree));
    dataSplitPane.add(treePanel, JSplitPane.LEFT);

    // Setup right panel which will display the data in the selected sObject
    SimpleToolWindowPanel dataPanel = new SimpleToolWindowPanel(true, true);
    ActionToolbar dataToolbar = createDataToolbar(dataTable);
    dataToolbar.setTargetComponent(dataPanel);
    dataPanel.setToolbar(dataToolbar.getComponent());
    dataPanel.setContent(ScrollPaneFactory.createScrollPane(dataTable));
    dataSplitPane.add(dataPanel, JSplitPane.RIGHT);

    dataSplitPane.getLeftComponent().setPreferredSize(new Dimension(250, 0));
    dataSplitPane.getRightComponent().setPreferredSize(new Dimension(0, 0));

    dataTree.addMouseListener(new DataExplorerMouseListener(dataTable, dataTree));

}
 
开发者ID:polyglot-mark,项目名称:salesforce-plugin,代码行数:37,代码来源:DataExplorerToolWindowFactory.java

示例4: setupToolingDataSplitPane

import com.intellij.ui.table.JBTable; //导入方法依赖的package包/类
private void setupToolingDataSplitPane(Project project) {
    ToolingRestClientService toolingRestClientService = ServiceManager.getService(project, ToolingRestClientService.class);
    SimpleNode toolingDataRootNode = new DataExplorerRootNode(project, toolingRestClientService, "Tooling sObjects");

    SimpleTree toolingDataTree = new SimpleTree();
    toolingDataTree.setShowsRootHandles(true);
    SimpleTreeBuilder toolingDataTreeBuilder = new SimpleTreeBuilder(toolingDataTree, (DefaultTreeModel) toolingDataTree.getModel(), new ExplorerTreeStructure(toolingDataRootNode), null);
    Disposer.register(project, toolingDataTreeBuilder);
    toolingDataTree.addTreeExpansionListener(new ExplorerTreeExpansionListener(toolingDataTreeBuilder));
    toolingDataTree.setCellRenderer(new ExplorerCellRenderer());
    JBTable toolingDataTable = new JBTable();
    toolingDataTable.setStriped(true);
    toolingDataTable.setAutoResizeMode(JTable.AUTO_RESIZE_OFF);

    // Setup left panel which will display all the available sObjects
    SimpleToolWindowPanel treePanel = new SimpleToolWindowPanel(true, true);
    ActionToolbar treeToolbar = createTreeToolbar(toolingDataRootNode, toolingDataTreeBuilder);
    treeToolbar.setTargetComponent(treePanel);
    treePanel.setToolbar(treeToolbar.getComponent());
    treePanel.setContent(ScrollPaneFactory.createScrollPane(toolingDataTree));
    toolingDataSplitPane.add(treePanel, JSplitPane.LEFT);

    // Setup right panel which will display the data in the selected sObject
    SimpleToolWindowPanel dataPanel = new SimpleToolWindowPanel(true, true);
    ActionToolbar dataToolbar = createDataToolbar(toolingDataTable);
    dataToolbar.setTargetComponent(dataPanel);
    dataPanel.setToolbar(dataToolbar.getComponent());
    dataPanel.setContent(ScrollPaneFactory.createScrollPane(toolingDataTable));
    toolingDataSplitPane.add(dataPanel, JSplitPane.RIGHT);

    toolingDataSplitPane.getLeftComponent().setPreferredSize(new Dimension(250, 0));
    toolingDataSplitPane.getRightComponent().setPreferredSize(new Dimension(0, 0));

    toolingDataTree.addMouseListener(new DataExplorerMouseListener(toolingDataTable, toolingDataTree));
}
 
开发者ID:polyglot-mark,项目名称:salesforce-plugin,代码行数:36,代码来源:DataExplorerToolWindowFactory.java

示例5: apply

import com.intellij.ui.table.JBTable; //导入方法依赖的package包/类
public static void apply(@Nonnull JBTable table) {
  table.setAutoResizeMode(AUTO_RESIZE_OFF);
  table.setTableHeader(createTableHeader(table.getColumnModel()));
  table.getTableHeader().setReorderingAllowed(false);
  //setOpaque(false);
  table.setGridColor(GRID_COLOR);
  table.setIntercellSpacing(new Dimension(1, 0));
  table.setShowGrid(false);
  table.setStriped(true);
}
 
开发者ID:consulo,项目名称:consulo,代码行数:11,代码来源:StripeTable.java


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