當前位置: 首頁>>代碼示例>>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;未經允許,請勿轉載。