当前位置: 首页>>代码示例>>Java>>正文


Java EventListenerList类代码示例

本文整理汇总了Java中javax.swing.event.EventListenerList的典型用法代码示例。如果您正苦于以下问题:Java EventListenerList类的具体用法?Java EventListenerList怎么用?Java EventListenerList使用的例子?那么, 这里精选的类代码示例或许可以为您提供帮助。


EventListenerList类属于javax.swing.event包,在下文中一共展示了EventListenerList类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。

示例1: OutputNode

import javax.swing.event.EventListenerList; //导入依赖的package包/类
/**
 * Creates a new output node
 */
public OutputNode() {
    this.connector = new NodeConnector(this);
    propertyChangeSupport = new PropertyChangeSupport(this);
    listenerList = new EventListenerList();
    img = null;
}
 
开发者ID:VISNode,项目名称:VISNode,代码行数:10,代码来源:OutputNode.java

示例2: testNodeListenersDetachedAtFinalizeIssue58065

import javax.swing.event.EventListenerList; //导入依赖的package包/类
public void testNodeListenersDetachedAtFinalizeIssue58065() throws Exception {
    CookieNode node = new CookieNode();
    SimpleCookieAction2 sca = new SimpleCookieAction2();
    Action action = sca.createContextAwareInstance(node.getLookup());
    
    class NodeListenerMemoryFilter implements MemoryFilter {
        public int numofnodelisteners = 0;
        public boolean reject(Object obj) {
            numofnodelisteners += (obj instanceof NodeListener)?1:0;
            return !((obj instanceof EventListenerList) | (obj instanceof Object[]));
        }
    }
    NodeListenerMemoryFilter filter = new NodeListenerMemoryFilter();
    assertSize("",Arrays.asList( new Object[] {node} ),1000000,filter);
    assertTrue("Node is expected to have a NodeListener attached", filter.numofnodelisteners > 0);
    
    Reference actionref = new WeakReference(sca);
    sca = null;
    action = null;
    assertGC("CookieAction is supposed to be GCed", actionref);
    
    NodeListenerMemoryFilter filter2 = new NodeListenerMemoryFilter();
    assertSize("",Arrays.asList( new Object[] {node} ),1000000,filter2);
    assertEquals("Node is expected to have no NodeListener attached", 0, filter2.numofnodelisteners);
}
 
开发者ID:apache,项目名称:incubator-netbeans,代码行数:26,代码来源:CookieAction2Test.java

示例3: MetaDataStatisticsModel

import javax.swing.event.EventListenerList; //导入依赖的package包/类
/**
 * Creates a new {@link MetaDataStatisticsModel} instance.
 * 
 * @param exampleSet
 *            the {@link ExampleSet} for which the meta data statistics should be created. No
 *            reference to it is stored to prevent memory leaks.
 */
public MetaDataStatisticsModel(final ExampleSet exampleSet) {
	this.weakExampleSet = new WeakReference<>(exampleSet);
	this.eventListener = new EventListenerList();
	visibleCount = -1;
	currentPageIndex = 0;

	mapOfStatModelVisibility = new HashMap<>();
	mapOfSortingSettings = new HashMap<>();
	mapOfValueTypeVisibility = new HashMap<>();
	for (String valueTypeString : Ontology.VALUE_TYPE_NAMES) {
		int valueType = Ontology.ATTRIBUTE_VALUE_TYPE.mapName(valueTypeString);
		mapOfValueTypeVisibility.put(valueType, Boolean.TRUE);
	}
	allowSortingAndFiltering = false;
	orderedModelList = new ArrayList<>();	// has to be ArrayList because we access the index
											// from 1-n on filtering
	showSpecialAttributes = true;
	showRegularAttributes = true;
	showOnlyMissingsAttributes = false;
	filterNameString = "";
}
 
开发者ID:transwarpio,项目名称:rapidminer,代码行数:29,代码来源:MetaDataStatisticsModel.java

示例4: clone

import javax.swing.event.EventListenerList; //导入依赖的package包/类
@Override
public HttpConnector clone() throws CloneNotSupportedException {
	HttpConnector clonedObject = (HttpConnector) super.clone();
	clonedObject.httpStateListeners = new EventListenerList();
	clonedObject.sUrl = "";
	clonedObject.handleCookie = true;
	clonedObject.httpParameters = new XMLVector<XMLVector<String>>();
	clonedObject.postQuery = "";

	clonedObject.certificateManager = new CertificateManager();

	clonedObject.hostConfiguration = new HostConfiguration();
	clonedObject.givenAuthPassword = null;
	clonedObject.givenAuthUser = null;

	return clonedObject;
}
 
开发者ID:convertigo,项目名称:convertigo-engine,代码行数:18,代码来源:HttpConnector.java

示例5: TargetChooser

import javax.swing.event.EventListenerList; //导入依赖的package包/类
public TargetChooser(SchemaModel m, String tb)
{
	this.model = m;
	this.targetBase = tb;

	if( targetBase == null || targetBase.length() == 0 || targetBase.equals("/") ) //$NON-NLS-1$
	{
		targetBase = null;
	}

	if( targetBase != null )
	{
		SchemaNode newRoot = model.getNode(targetBase);
		model = new SchemaModel(newRoot);
	}

	listeners = new EventListenerList();
}
 
开发者ID:equella,项目名称:Equella,代码行数:19,代码来源:TargetChooser.java

示例6: SpellingParser

import javax.swing.event.EventListenerList; //导入依赖的package包/类
/**
 * Constructor.
 *
 * @param dict The dictionary to use.
 */
public SpellingParser(SpellDictionary dict) {

	result = new DefaultParseResult(this);
	sc = new SpellChecker(dict);
	sc.addSpellCheckListener(this);
	setSquiggleUnderlineColor(Color.BLUE);
	setHyperlinkListener(this);
	setMaxErrorCount(DEFAULT_MAX_ERROR_COUNT);
	setAllowAdd(true);
	setAllowIgnore(true);
	setSpellCheckableTokenIdentifier(
			new DefaultSpellCheckableTokenIdentifier());

	// Since the spelling callback can possibly be called many times
	// per parsing, we're extremely cheap here and pre-split our message
	// format instead of using MessageFormat.
	//String temp = msg.getString("IncorrectSpelling");
	//int offs = temp.indexOf("{0}");
	//noticePrefix = temp.substring(0, offs);
	//noticeSuffix = temp.substring(offs+3);

	listenerList = new EventListenerList();

}
 
开发者ID:Thecarisma,项目名称:powertext,代码行数:30,代码来源:SpellingParser.java

示例7: readObject

import javax.swing.event.EventListenerList; //导入依赖的package包/类
/**
 * Provides serialization support.
 *
 * @param stream  the input stream.
 *
 * @throws IOException  if there is an I/O error.
 * @throws ClassNotFoundException  if there is a classpath problem.
 */
private void readObject(ObjectInputStream stream) throws IOException, ClassNotFoundException {

    stream.defaultReadObject();
    this.paint = SerialUtilities.readPaint(stream);
    this.basePaint = SerialUtilities.readPaint(stream);
    this.outlinePaint = SerialUtilities.readPaint(stream);
    this.baseOutlinePaint = SerialUtilities.readPaint(stream);
    this.stroke = SerialUtilities.readStroke(stream);
    this.baseStroke = SerialUtilities.readStroke(stream);
    this.outlineStroke = SerialUtilities.readStroke(stream);
    this.baseOutlineStroke = SerialUtilities.readStroke(stream);
    this.shape = SerialUtilities.readShape(stream);
    this.baseShape = SerialUtilities.readShape(stream);
    this.itemLabelPaint = SerialUtilities.readPaint(stream);
    this.baseItemLabelPaint = SerialUtilities.readPaint(stream);
    
    // listeners are not restored automatically, but storage must be provided...
    this.listenerList = new EventListenerList();

}
 
开发者ID:parabuild-ci,项目名称:parabuild-ci,代码行数:29,代码来源:AbstractRenderer.java

示例8: Plot

import javax.swing.event.EventListenerList; //导入依赖的package包/类
/**
 * Creates a new plot.
 */
protected Plot() {

    this.parent = null;
    // make sure, that no one modifies the global default insets. 
    this.insets = new Insets (DEFAULT_INSETS.top, DEFAULT_INSETS.left,
        DEFAULT_INSETS.bottom, DEFAULT_INSETS.right);
    this.backgroundPaint = DEFAULT_BACKGROUND_PAINT;
    this.backgroundAlpha = DEFAULT_BACKGROUND_ALPHA;
    this.backgroundImage = null;
    this.outlineStroke = DEFAULT_OUTLINE_STROKE;
    this.outlinePaint = DEFAULT_OUTLINE_PAINT;
    this.foregroundAlpha = DEFAULT_FOREGROUND_ALPHA;

    this.noDataMessage = null;
    this.noDataMessageFont = new Font("SansSerif", Font.PLAIN, 12);
    this.noDataMessagePaint = Color.black;

    this.drawingSupplier = new DefaultDrawingSupplier();

    this.listenerList = new EventListenerList();

}
 
开发者ID:parabuild-ci,项目名称:parabuild-ci,代码行数:26,代码来源:Plot.java

示例9: readObject

import javax.swing.event.EventListenerList; //导入依赖的package包/类
/**
 * Provides serialization support.
 *
 * @param stream  the input stream.
 *
 * @throws IOException  if there is an I/O error.
 * @throws ClassNotFoundException  if there is a classpath problem.
 */
private void readObject(ObjectInputStream stream) 
    throws IOException, ClassNotFoundException {

    stream.defaultReadObject();
    this.paint = SerialUtilities.readPaint(stream);
    this.basePaint = SerialUtilities.readPaint(stream);
    this.fillPaint = SerialUtilities.readPaint(stream);
    this.baseFillPaint = SerialUtilities.readPaint(stream);
    this.outlinePaint = SerialUtilities.readPaint(stream);
    this.baseOutlinePaint = SerialUtilities.readPaint(stream);
    this.stroke = SerialUtilities.readStroke(stream);
    this.baseStroke = SerialUtilities.readStroke(stream);
    this.outlineStroke = SerialUtilities.readStroke(stream);
    this.baseOutlineStroke = SerialUtilities.readStroke(stream);
    this.shape = SerialUtilities.readShape(stream);
    this.baseShape = SerialUtilities.readShape(stream);
    this.itemLabelPaint = SerialUtilities.readPaint(stream);
    this.baseItemLabelPaint = SerialUtilities.readPaint(stream);
    
    // listeners are not restored automatically, but storage must be 
    // provided...
    this.listenerList = new EventListenerList();

}
 
开发者ID:parabuild-ci,项目名称:parabuild-ci,代码行数:33,代码来源:AbstractRenderer.java

示例10: Plot

import javax.swing.event.EventListenerList; //导入依赖的package包/类
/**
 * Creates a new plot.
 */
protected Plot() {

    this.parent = null;
    this.insets = DEFAULT_INSETS;
    this.backgroundPaint = DEFAULT_BACKGROUND_PAINT;
    this.backgroundAlpha = DEFAULT_BACKGROUND_ALPHA;
    this.backgroundImage = null;
    this.outlineStroke = DEFAULT_OUTLINE_STROKE;
    this.outlinePaint = DEFAULT_OUTLINE_PAINT;
    this.foregroundAlpha = DEFAULT_FOREGROUND_ALPHA;

    this.noDataMessage = null;
    this.noDataMessageFont = new Font("SansSerif", Font.PLAIN, 12);
    this.noDataMessagePaint = Color.black;

    this.drawingSupplier = new DefaultDrawingSupplier();

    this.listenerList = new EventListenerList();

}
 
开发者ID:parabuild-ci,项目名称:parabuild-ci,代码行数:24,代码来源:Plot.java

示例11: readObject

import javax.swing.event.EventListenerList; //导入依赖的package包/类
/**
 * Provides serialization support.
 *
 * @param stream  the input stream.
 *
 * @throws IOException  if there is an I/O error.
 * @throws ClassNotFoundException  if there is a classpath problem.
 */
private void readObject(ObjectInputStream stream) 
    throws IOException, ClassNotFoundException {
    stream.defaultReadObject();
    this.borderStroke = SerialUtilities.readStroke(stream);
    this.borderPaint = SerialUtilities.readPaint(stream);
    this.backgroundPaint = SerialUtilities.readPaint(stream);
    this.progressListeners = new EventListenerList();
    this.changeListeners = new EventListenerList();
    this.renderingHints = new RenderingHints(
            RenderingHints.KEY_ANTIALIASING, 
            RenderingHints.VALUE_ANTIALIAS_ON);

    // register as a listener with sub-components...
    if (this.title != null) {
        this.title.addChangeListener(this);
    }

    for (int i = 0; i < getSubtitleCount(); i++) {
        getSubtitle(i).addChangeListener(this);
    }
    this.plot.addChangeListener(this);
}
 
开发者ID:parabuild-ci,项目名称:parabuild-ci,代码行数:31,代码来源:JFreeChart.java

示例12: readObject

import javax.swing.event.EventListenerList; //导入依赖的package包/类
private void readObject(ObjectInputStream in)
    throws ClassNotFoundException, IOException
{
    this.acc = AccessController.getContext();
    ObjectInputStream.GetField f = in.readFields();

    EventListenerList newListenerList = (EventListenerList)
            f.get("listenerList", null);
    if (newListenerList == null) {
        throw new InvalidObjectException("Null listenerList");
    }
    listenerList = newListenerList;

    int newInitialDelay = f.get("initialDelay", 0);
    checkDelay(newInitialDelay, "Invalid initial delay: ");
    initialDelay = newInitialDelay;

    int newDelay = f.get("delay", 0);
    checkDelay(newDelay, "Invalid delay: ");
    delay = newDelay;

    repeats = f.get("repeats", false);
    coalesce = f.get("coalesce", false);
    actionCommand = (String) f.get("actionCommand", null);
}
 
开发者ID:AdoptOpenJDK,项目名称:openjdk-jdk10,代码行数:26,代码来源:Timer.java

示例13: Title

import javax.swing.event.EventListenerList; //导入依赖的package包/类
/**
 * Creates a new title.
 *
 * @param position  the position of the title (<code>null</code> not
 *                  permitted).
 * @param horizontalAlignment  the horizontal alignment of the title (LEFT,
 *                             CENTER or RIGHT, <code>null</code> not
 *                             permitted).
 * @param verticalAlignment  the vertical alignment of the title (TOP,
 *                           MIDDLE or BOTTOM, <code>null</code> not
 *                           permitted).
 * @param padding  the amount of space to leave around the outside of the
 *                 title (<code>null</code> not permitted).
 */
protected Title(RectangleEdge position, 
        HorizontalAlignment horizontalAlignment, 
        VerticalAlignment verticalAlignment, RectangleInsets padding) {

    ParamChecks.nullNotPermitted(position, "position");
    ParamChecks.nullNotPermitted(horizontalAlignment, "horizontalAlignment");
    ParamChecks.nullNotPermitted(verticalAlignment, "verticalAlignment");
    ParamChecks.nullNotPermitted(padding, "padding");

    this.visible = true;
    this.position = position;
    this.horizontalAlignment = horizontalAlignment;
    this.verticalAlignment = verticalAlignment;
    setPadding(padding);
    this.listenerList = new EventListenerList();
    this.notify = true;
}
 
开发者ID:mdzio,项目名称:ccu-historian,代码行数:32,代码来源:Title.java

示例14: readObject

import javax.swing.event.EventListenerList; //导入依赖的package包/类
/**
 * Provides serialization support.
 *
 * @param stream  the input stream.
 *
 * @throws IOException  if there is an I/O error.
 * @throws ClassNotFoundException  if there is a classpath problem.
 */
private void readObject(ObjectInputStream stream)
    throws IOException, ClassNotFoundException {
    stream.defaultReadObject();
    this.zoomFillPaint = SerialUtilities.readPaint(stream);
    this.zoomOutlinePaint = SerialUtilities.readPaint(stream);

    // we create a new but empty chartMouseListeners list
    this.chartMouseListeners = new EventListenerList();

    // register as a listener with sub-components...
    if (this.chart != null) {
        this.chart.addChangeListener(this);
    }

}
 
开发者ID:mdzio,项目名称:ccu-historian,代码行数:24,代码来源:ChartPanel.java

示例15: Plot

import javax.swing.event.EventListenerList; //导入依赖的package包/类
/**
 * Creates a new plot.
 */
protected Plot() {

    this.parent = null;
    this.insets = DEFAULT_INSETS;
    this.backgroundPaint = DEFAULT_BACKGROUND_PAINT;
    this.backgroundAlpha = DEFAULT_BACKGROUND_ALPHA;
    this.backgroundImage = null;
    this.outlineVisible = true;
    this.outlineStroke = DEFAULT_OUTLINE_STROKE;
    this.outlinePaint = DEFAULT_OUTLINE_PAINT;
    this.foregroundAlpha = DEFAULT_FOREGROUND_ALPHA;

    this.noDataMessage = null;
    this.noDataMessageFont = new Font("SansSerif", Font.PLAIN, 12);
    this.noDataMessagePaint = Color.black;

    this.drawingSupplier = new DefaultDrawingSupplier();

    this.notify = true;
    this.listenerList = new EventListenerList();

}
 
开发者ID:mdzio,项目名称:ccu-historian,代码行数:26,代码来源:Plot.java


注:本文中的javax.swing.event.EventListenerList类示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。