本文整理汇总了Java中javax.swing.event.TableColumnModelListener类的典型用法代码示例。如果您正苦于以下问题:Java TableColumnModelListener类的具体用法?Java TableColumnModelListener怎么用?Java TableColumnModelListener使用的例子?那么, 这里精选的类代码示例或许可以为您提供帮助。
TableColumnModelListener类属于javax.swing.event包,在下文中一共展示了TableColumnModelListener类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: fireColumnMarginChanged
import javax.swing.event.TableColumnModelListener; //导入依赖的package包/类
protected void fireColumnMarginChanged() {
Object[] listeners = listenerList.getListenerList();
for (int i = listeners.length - 2; i >= 0; i -= 2) {
if (listeners[i] == TableColumnModelListener64.class) {
if (changeEvent == null) {
changeEvent = new ChangeEvent(this);
}
((TableColumnModelListener64) listeners[i + 1]).columnMarginChanged(changeEvent);
} else if (listeners[i] == TableColumnModelListener.class) {
if (changeEvent == null) {
changeEvent = new ChangeEvent(this);
}
((TableColumnModelListener) listeners[i + 1]).columnMarginChanged(changeEvent);
}
}
}
示例2: ExtColumnModel
import javax.swing.event.TableColumnModelListener; //导入依赖的package包/类
/**
* @param columnModel
*/
public ExtColumnModel(final TableColumnModel org) {
super();
this.setColumnMargin(org.getColumnMargin());
this.setColumnSelectionAllowed(org.getColumnSelectionAllowed());
this.setSelectionModel(org.getSelectionModel());
for (int i = 0; i < org.getColumnCount(); i++) {
this.addColumn(org.getColumn(i));
}
if (org instanceof DefaultTableColumnModel) {
for (final TableColumnModelListener cl : ((DefaultTableColumnModel) org).getColumnModelListeners()) {
this.addColumnModelListener(cl);
}
}
}
示例3: moveColumn
import javax.swing.event.TableColumnModelListener; //导入依赖的package包/类
public void moveColumn(int fromIndex, int toIndex) {
if (!MainFrame.getInstance().canNavigateAway())
return;
MainFrame.getInstance().updateDesignationDisplay();
TableColumn from = columnList.get(fromIndex);
TableColumn to = columnList.get(toIndex);
columnList.set(fromIndex, to);
to.setModelIndex(fromIndex);
columnList.set(toIndex, from);
from.setModelIndex(toIndex);
orderUpdate();
for (TableColumnModelListener w : new ArrayList<TableColumnModelListener>(watchers)) {
w.columnMoved(new TableColumnModelEvent(this, fromIndex, toIndex));
}
}
示例4: fireColumnAdded
import javax.swing.event.TableColumnModelListener; //导入依赖的package包/类
protected void fireColumnAdded(TableColumnModelEvent e) {
Object[] listeners = listenerList.getListenerList();
for (int i = listeners.length - 2; i >= 0; i -= 2) {
if (listeners[i] == TableColumnModelListener.class) {
((TableColumnModelListener) listeners[i + 1]).columnAdded(e);
}
}
}
示例5: fireColumnRemoved
import javax.swing.event.TableColumnModelListener; //导入依赖的package包/类
protected void fireColumnRemoved(TableColumnModelEvent e) {
Object[] listeners = listenerList.getListenerList();
for (int i = listeners.length - 2; i >= 0; i -= 2) {
if (listeners[i] == TableColumnModelListener.class) {
((TableColumnModelListener) listeners[i + 1]).columnRemoved(e);
}
}
}
示例6: fireColumnMoved
import javax.swing.event.TableColumnModelListener; //导入依赖的package包/类
protected void fireColumnMoved(TableColumnModelEvent e) {
Object[] listeners = listenerList.getListenerList();
for (int i = listeners.length - 2; i >= 0; i -= 2) {
if (listeners[i] == TableColumnModelListener.class) {
((TableColumnModelListener) listeners[i + 1]).columnMoved(e);
}
}
}
示例7: fireColumnSelectionChanged
import javax.swing.event.TableColumnModelListener; //导入依赖的package包/类
protected void fireColumnSelectionChanged(ListSelectionEvent e) {
Object[] listeners = listenerList.getListenerList();
for (int i = listeners.length - 2; i >= 0; i -= 2) {
if (listeners[i] == TableColumnModelListener.class) {
((TableColumnModelListener) listeners[i + 1]).columnSelectionChanged(e);
}
}
}
示例8: fireColumnMarginChanged
import javax.swing.event.TableColumnModelListener; //导入依赖的package包/类
protected void fireColumnMarginChanged() {
Object[] listeners = listenerList.getListenerList();
ChangeEvent changeEvent = null;
for (int i = listeners.length - 2; i >= 0; i -= 2) {
if (listeners[i] == TableColumnModelListener.class) {
if (changeEvent == null)
changeEvent = new ChangeEvent(this);
((TableColumnModelListener) listeners[i + 1])
.columnMarginChanged(changeEvent);
}
}
}
示例9: fireColumnMarginChanged
import javax.swing.event.TableColumnModelListener; //导入依赖的package包/类
/**
* Sends a {@link ChangeEvent} to the model's registered listeners to
* indicate that the column margin was changed.
*
* @see #setColumnMargin(int)
*/
protected void fireColumnMarginChanged()
{
EventListener[] listeners = getListeners(TableColumnModelListener.class);
if (changeEvent == null && listeners.length > 0)
changeEvent = new ChangeEvent(this);
for (int i = 0; i < listeners.length; ++i)
((TableColumnModelListener) listeners[i]).columnMarginChanged(changeEvent);
}
示例10: fireColumnMarginChanged
import javax.swing.event.TableColumnModelListener; //导入依赖的package包/类
/**
* Sends a {@link ChangeEvent} to the model's registered listeners to
* indicate that the column margin was changed.
*
* @see #setColumnMargin(int)
*/
protected void fireColumnMarginChanged()
{
EventListener[] listeners = getListeners(TableColumnModelListener.class);
if (changeEvent == null && listeners.length > 0)
changeEvent = new ChangeEvent(this);
for (int i = 0; i < listeners.length; ++i)
((TableColumnModelListener) listeners[i]).columnMarginChanged(changeEvent);
}
示例11: getColumnModelListener
import javax.swing.event.TableColumnModelListener; //导入依赖的package包/类
/**
* Returns the listener to table's column model. The listener is
* lazily created if necessary.
* @return the <code>TableColumnModelListener</code> for use with the
* table's column model, guaranteed to be not <code>null</code>.
*/
protected TableColumnModelListener getColumnModelListener() {
if (columnModelListener == null) {
columnModelListener = createColumnModelListener();
}
return columnModelListener;
}
示例12: removeColumnModelListener
import javax.swing.event.TableColumnModelListener; //导入依赖的package包/类
/**
* {@inheritDoc} <p>
*
* Overridden to uninstall enhanced notification of listeners of type.
* TableColumnModelListenerExt about property changes of contained columns.
*/
@Override
public void removeColumnModelListener(TableColumnModelListener x) {
super.removeColumnModelListener(x);
if (x instanceof TableColumnModelExtListener) {
listenerList.remove(TableColumnModelExtListener.class, (TableColumnModelExtListener) x);
}
}
示例13: addColumnModelListener
import javax.swing.event.TableColumnModelListener; //导入依赖的package包/类
public void addColumnModelListener(TableColumnModelListener x) {
if (x instanceof TableColumnModelListener64) {
super.addColumnModelListener(x);
} else {
throw new IllegalArgumentException("use TableColumnModelListener64");
}
}
示例14: removeColumnModelListener
import javax.swing.event.TableColumnModelListener; //导入依赖的package包/类
public void removeColumnModelListener(TableColumnModelListener x) {
if (x instanceof TableColumnModelListener64) {
super.removeColumnModelListener(x);
} else {
throw new IllegalArgumentException("use TableColumnModelListener64");
}
}
示例15: getColumnModelListener
import javax.swing.event.TableColumnModelListener; //导入依赖的package包/类
/**
* Returns the listener to table's column model. The listener is lazily created if necessary.
*
* @return the <code>TableColumnModelListener</code> for use with the table's column model, guaranteed to be not <code>null</code>.
*/
private TableColumnModelListener getColumnModelListener()
{
if (columnModelListener == null)
{
columnModelListener = createColumnModelListener();
}
return columnModelListener;
}