當前位置: 首頁>>代碼示例>>Java>>正文


Java TableColumnModelListener類代碼示例

本文整理匯總了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);
		}
	}
}
 
開發者ID:ujmp,項目名稱:universal-java-matrix-package,代碼行數:19,代碼來源:DefaultTableColumnModel64.java

示例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);
        }
    }

}
 
開發者ID:friedlwo,項目名稱:AppWoksUtils,代碼行數:19,代碼來源:ExtColumnModel.java

示例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));
        }
    }
 
開發者ID:ytus,項目名稱:findbugs-all-the-bugs,代碼行數:21,代碼來源:SorterTableColumnModel.java

示例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);
		}
	}
}
 
開發者ID:javalovercn,項目名稱:j2se_for_android,代碼行數:9,代碼來源:DefaultTableColumnModel.java

示例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);
		}
	}
}
 
開發者ID:javalovercn,項目名稱:j2se_for_android,代碼行數:9,代碼來源:DefaultTableColumnModel.java

示例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);
		}
	}
}
 
開發者ID:javalovercn,項目名稱:j2se_for_android,代碼行數:9,代碼來源:DefaultTableColumnModel.java

示例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);
		}
	}
}
 
開發者ID:javalovercn,項目名稱:j2se_for_android,代碼行數:9,代碼來源:DefaultTableColumnModel.java

示例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);
		}
	}
}
 
開發者ID:javalovercn,項目名稱:j2se_for_android,代碼行數:13,代碼來源:DefaultTableColumnModel.java

示例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);
}
 
開發者ID:vilie,項目名稱:javify,代碼行數:15,代碼來源:DefaultTableColumnModel.java

示例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);
}
 
開發者ID:nmldiegues,項目名稱:jvm-stm,代碼行數:15,代碼來源:DefaultTableColumnModel.java

示例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;
}
 
開發者ID:RockManJoe64,項目名稱:swingx,代碼行數:13,代碼來源:ColumnControlButton.java

示例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);
    }
}
 
開發者ID:RockManJoe64,項目名稱:swingx,代碼行數:14,代碼來源:DefaultTableColumnModelExt.java

示例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");
	}
}
 
開發者ID:ujmp,項目名稱:universal-java-matrix-package,代碼行數:8,代碼來源:DefaultTableColumnModel64.java

示例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");
	}
}
 
開發者ID:ujmp,項目名稱:universal-java-matrix-package,代碼行數:8,代碼來源:DefaultTableColumnModel64.java

示例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;
}
 
開發者ID:metasfresh,項目名稱:metasfresh,代碼行數:14,代碼來源:CColumnControlButton.java


注:本文中的javax.swing.event.TableColumnModelListener類示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。