当前位置: 首页>>代码示例>>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;未经允许,请勿转载。