本文整理匯總了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;
}