本文整理匯總了Java中org.jdesktop.swingx.JXTable.setHorizontalScrollEnabled方法的典型用法代碼示例。如果您正苦於以下問題:Java JXTable.setHorizontalScrollEnabled方法的具體用法?Java JXTable.setHorizontalScrollEnabled怎麽用?Java JXTable.setHorizontalScrollEnabled使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類org.jdesktop.swingx.JXTable
的用法示例。
在下文中一共展示了JXTable.setHorizontalScrollEnabled方法的5個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的Java代碼示例。
示例1: setSessionState
import org.jdesktop.swingx.JXTable; //導入方法依賴的package包/類
public void setSessionState(Component c, Object state) {
checkComponent(c);
JXTable table = (JXTable) c;
XTableState tableState = ((XTableState) state);
ColumnState[] columnState = tableState.getColumnStates();
List<TableColumn> columns = table.getColumns(true);
if (canRestore(columnState, columns)) {
for (int i = 0; i < columnState.length; i++) {
columnState[i].configureColumn((TableColumnExt) columns
.get(i));
}
restoreVisibleSequence(columnState, table.getColumnModel());
}
table.setHorizontalScrollEnabled(tableState
.getHorizontalScrollEnabled());
if (tableState.getSortKey() != null) {
table.getRowSorter().setSortKeys(
Collections.singletonList(tableState.getSortKey()));
}
}
示例2: createActionListModel
import org.jdesktop.swingx.JXTable; //導入方法依賴的package包/類
/**
* @return
*/
private ListModel createActionListModel() {
JXTable table = new JXTable(10, 10);
table.setHorizontalScrollEnabled(true);
ActionMap map = table.getActionMap();
Object[] keys = map.keys();
DefaultListModel model = new DefaultListModel();
for (Object object : keys) {
model.addElement(map.get(object));
}
return model;
}
示例3: interactiveTableRolloverScroll
import org.jdesktop.swingx.JXTable; //導入方法依賴的package包/類
/**
* Issue #1193-swingx: rollover state not updated on scrolling/mouseWheel
*
* visualize behaviour on
* - scrolling (with mouse wheel)
* - resizing (added custom actions)
*/
public void interactiveTableRolloverScroll() {
final JXTable table = new JXTable(new AncientSwingTeam());
table.setEditable(false);
table.setHorizontalScrollEnabled(true);
table.addHighlighter(new ColorHighlighter(HighlightPredicate.ROLLOVER_ROW, Color.YELLOW, null));
final JXFrame frame = getResizableFrame(table);
show(frame);
}
示例4: setHorizontalScrollEnabled
import org.jdesktop.swingx.JXTable; //導入方法依賴的package包/類
@Override
public void setHorizontalScrollEnabled(Table table, boolean enabled) {
JXTable jxTable = (JXTable) DesktopComponentsHelper.unwrap(table);
jxTable.setHorizontalScrollEnabled(enabled);
}
示例5: createActionTreeModel
import org.jdesktop.swingx.JXTable; //導入方法依賴的package包/類
/**
* @return
*/
private TreeModel createActionTreeModel() {
JXTable table = new JXTable(10, 10);
table.setHorizontalScrollEnabled(true);
return new ActionMapTreeTableModel(table);
}