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


Java EventSourceWeakSupport類代碼示例

本文整理匯總了Java中com.cburch.logisim.util.EventSourceWeakSupport的典型用法代碼示例。如果您正苦於以下問題:Java EventSourceWeakSupport類的具體用法?Java EventSourceWeakSupport怎麽用?Java EventSourceWeakSupport使用的例子?那麽, 這裏精選的類代碼示例或許可以為您提供幫助。


EventSourceWeakSupport類屬於com.cburch.logisim.util包,在下文中一共展示了EventSourceWeakSupport類的15個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的Java代碼示例。

示例1: clone

import com.cburch.logisim.util.EventSourceWeakSupport; //導入依賴的package包/類
@Override
public CanvasObject clone() {
	try {
		AbstractCanvasObject ret = (AbstractCanvasObject) super.clone();
		ret.listeners = new EventSourceWeakSupport<AttributeListener>();
		return ret;
	} catch (CloneNotSupportedException e) {
		return null;
	}
}
 
開發者ID:LogisimIt,項目名稱:Logisim,代碼行數:11,代碼來源:AbstractCanvasObject.java

示例2: clone

import com.cburch.logisim.util.EventSourceWeakSupport; //導入依賴的package包/類
@Override
public Object clone() {
	try {
		DrawingAttributeSet ret = (DrawingAttributeSet) super.clone();
		ret.listeners = new EventSourceWeakSupport<AttributeListener>();
		ret.values = new ArrayList<Object>(this.values);
		return ret;
	} catch (CloneNotSupportedException e) {
		return null;
	}
}
 
開發者ID:LogisimIt,項目名稱:Logisim,代碼行數:12,代碼來源:DrawingAttributeSet.java

示例3: addComponentListener

import com.cburch.logisim.util.EventSourceWeakSupport; //導入依賴的package包/類
@Override
public void addComponentListener(ComponentListener l) {
	EventSourceWeakSupport<ComponentListener> ls = listeners;
	if (ls == null) {
		ls = new EventSourceWeakSupport<ComponentListener>();
		ls.add(l);
		listeners = ls;
	} else {
		ls.add(l);
	}
}
 
開發者ID:LogisimIt,項目名稱:Logisim,代碼行數:12,代碼來源:InstanceComponent.java

示例4: LoadedLibrary

import com.cburch.logisim.util.EventSourceWeakSupport; //導入依賴的package包/類
LoadedLibrary(Library base) {
	dirty = false;
	myListener = new MyListener();
	listeners = new EventSourceWeakSupport<LibraryListener>();

	while (base instanceof LoadedLibrary)
		base = ((LoadedLibrary) base).base;
	this.base = base;
	if (base instanceof LibraryEventSource) {
		((LibraryEventSource) base).addLibraryListener(myListener);
	}
}
 
開發者ID:LogisimIt,項目名稱:Logisim,代碼行數:13,代碼來源:LoadedLibrary.java

示例5: CircuitAppearance

import com.cburch.logisim.util.EventSourceWeakSupport; //導入依賴的package包/類
public CircuitAppearance(Circuit circuit) {
	this.circuit = circuit;
	listeners = new EventSourceWeakSupport<CircuitAppearanceListener>();
	portManager = new PortManager(this);
	circuitPins = new CircuitPins(portManager);
	myListener = new MyListener();
	suppressRecompute = false;
	addCanvasModelListener(myListener);
	setDefaultAppearance(true);
}
 
開發者ID:LogisimIt,項目名稱:Logisim,代碼行數:11,代碼來源:CircuitAppearance.java

示例6: addHdlModelListener

import com.cburch.logisim.util.EventSourceWeakSupport; //導入依賴的package包/類
@Override
public void addHdlModelListener(HdlModelListener l) {
	if (listeners == null) {
		listeners = new EventSourceWeakSupport<HdlModelListener>();
	}
	listeners.add(l);
}
 
開發者ID:reds-heig,項目名稱:logisim-evolution,代碼行數:8,代碼來源:HdlContent.java

示例7: addComponentListener

import com.cburch.logisim.util.EventSourceWeakSupport; //導入依賴的package包/類
public void addComponentListener(ComponentListener l) {
	EventSourceWeakSupport<ComponentListener> ls = listeners;
	if (ls == null) {
		ls = new EventSourceWeakSupport<ComponentListener>();
		ls.add(l);
		listeners = ls;
	} else {
		ls.add(l);
	}
}
 
開發者ID:reds-heig,項目名稱:logisim-evolution,代碼行數:11,代碼來源:InstanceComponent.java

示例8: LoadedLibrary

import com.cburch.logisim.util.EventSourceWeakSupport; //導入依賴的package包/類
LoadedLibrary(Library base) {
	dirty = false;
	myListener = new MyListener();
	listeners = new EventSourceWeakSupport<LibraryListener>();
	
	while (base instanceof LoadedLibrary) base = ((LoadedLibrary) base).base;
	this.base = base;
	if (base instanceof LibraryEventSource) {
		((LibraryEventSource) base).addLibraryListener(myListener);
	}
}
 
開發者ID:franciscaconcha,項目名稱:ProyectoLogisim,代碼行數:12,代碼來源:LoadedLibrary.java

示例9: UndoLog

import com.cburch.logisim.util.EventSourceWeakSupport; //導入依賴的package包/類
public UndoLog() {
	this.listeners = new EventSourceWeakSupport<UndoLogListener>();
	this.undoLog = new LinkedList<Action>();
	this.redoLog = new LinkedList<Action>();
	this.modCount = 0;
}
 
開發者ID:LogisimIt,項目名稱:Logisim,代碼行數:7,代碼來源:UndoLog.java

示例10: Drawing

import com.cburch.logisim.util.EventSourceWeakSupport; //導入依賴的package包/類
public Drawing() {
	listeners = new EventSourceWeakSupport<CanvasModelListener>();
	canvasObjects = new ArrayList<CanvasObject>();
	overlaps = new DrawingOverlaps();
}
 
開發者ID:LogisimIt,項目名稱:Logisim,代碼行數:6,代碼來源:Drawing.java

示例11: AbstractCanvasObject

import com.cburch.logisim.util.EventSourceWeakSupport; //導入依賴的package包/類
public AbstractCanvasObject() {
	listeners = new EventSourceWeakSupport<AttributeListener>();
}
 
開發者ID:LogisimIt,項目名稱:Logisim,代碼行數:4,代碼來源:AbstractCanvasObject.java

示例12: DrawingAttributeSet

import com.cburch.logisim.util.EventSourceWeakSupport; //導入依賴的package包/類
public DrawingAttributeSet() {
	listeners = new EventSourceWeakSupport<AttributeListener>();
	attrs = ATTRS_ALL;
	values = DEFAULTS_ALL;
}
 
開發者ID:LogisimIt,項目名稱:Logisim,代碼行數:6,代碼來源:DrawingAttributeSet.java

示例13: addHexModelListener

import com.cburch.logisim.util.EventSourceWeakSupport; //導入依賴的package包/類
@Override
public void addHexModelListener(HexModelListener l) {
	if (listeners == null)
		listeners = new EventSourceWeakSupport<HexModelListener>();
	listeners.add(l);
}
 
開發者ID:LogisimIt,項目名稱:Logisim,代碼行數:7,代碼來源:MemContents.java

示例14: ToolbarData

import com.cburch.logisim.util.EventSourceWeakSupport; //導入依賴的package包/類
public ToolbarData() {
	listeners = new EventSourceWeakSupport<ToolbarListener>();
	toolListeners = new EventSourceWeakSupport<AttributeListener>();
	contents = new ArrayList<Tool>();
}
 
開發者ID:LogisimIt,項目名稱:Logisim,代碼行數:6,代碼來源:ToolbarData.java

示例15: Model

import com.cburch.logisim.util.EventSourceWeakSupport; //導入依賴的package包/類
public Model(CircuitState circuitState) {
	listeners = new EventSourceWeakSupport<ModelListener>();
	selection = new Selection(circuitState, this);
	log = new HashMap<SelectionItem, ValueLog>();
}
 
開發者ID:LogisimIt,項目名稱:Logisim,代碼行數:6,代碼來源:Model.java


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