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


Java JoinedConfigurator類代碼示例

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


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

示例1: ShiftRegister

import com.cburch.logisim.tools.key.JoinedConfigurator; //導入依賴的package包/類
public ShiftRegister() {
	super("Shift Register", Strings.getter("shiftRegisterComponent"));
	setAttributes(new Attribute[] {
			StdAttr.WIDTH, ATTR_LENGTH, ATTR_LOAD, StdAttr.EDGE_TRIGGER,
			StdAttr.LABEL, StdAttr.LABEL_FONT
		}, new Object[] {
			BitWidth.ONE, Integer.valueOf(8), Boolean.TRUE,
			StdAttr.TRIG_RISING, "", StdAttr.DEFAULT_LABEL_FONT
		});
	setKeyConfigurator(JoinedConfigurator.create(
			new IntegerConfigurator(ATTR_LENGTH, 1, 32, 0),
			new BitWidthConfigurator(StdAttr.WIDTH)));

	setIconName("shiftreg.gif");
	setInstanceLogger(ShiftRegisterLogger.class);
	setInstancePoker(ShiftRegisterPoker.class);
}
 
開發者ID:franciscaconcha,項目名稱:ProyectoLogisim,代碼行數:18,代碼來源:ShiftRegister.java

示例2: ShiftRegister

import com.cburch.logisim.tools.key.JoinedConfigurator; //導入依賴的package包/類
public ShiftRegister() {
	super("Shift Register", Strings.getter("shiftRegisterComponent"));
	setAttributes(
			new Attribute[] { StdAttr.WIDTH, ATTR_LENGTH, ATTR_LOAD, StdAttr.EDGE_TRIGGER, StdAttr.LABEL,
					StdAttr.LABEL_FONT, StdAttr.ATTR_LABEL_COLOR },
			new Object[] { BitWidth.ONE, Integer.valueOf(8), Boolean.TRUE, StdAttr.TRIG_RISING, "",
					StdAttr.DEFAULT_LABEL_FONT, Color.BLACK });
	setKeyConfigurator(JoinedConfigurator.create(new IntegerConfigurator(ATTR_LENGTH, 1, 32, 0),
			new BitWidthConfigurator(StdAttr.WIDTH)));

	setIconName("shiftreg.gif");
	setInstanceLogger(ShiftRegisterLogger.class);
	setInstancePoker(ShiftRegisterPoker.class);
}
 
開發者ID:LogisimIt,項目名稱:Logisim,代碼行數:15,代碼來源:ShiftRegister.java

示例3: Mem

import com.cburch.logisim.tools.key.JoinedConfigurator; //導入依賴的package包/類
Mem(String name, StringGetter desc, int extraPorts) {
	super(name, desc);
	currentInstanceFiles = new WeakHashMap<Instance, File>();
	setInstancePoker(MemPoker.class);
	setKeyConfigurator(JoinedConfigurator.create(new BitWidthConfigurator(ADDR_ATTR, 2, 24, 0),
			new BitWidthConfigurator(DATA_ATTR)));

	setOffsetBounds(Bounds.create(-140, -40, 140, 80));
}
 
開發者ID:LogisimIt,項目名稱:Logisim,代碼行數:10,代碼來源:Mem.java

示例4: BitExtender

import com.cburch.logisim.tools.key.JoinedConfigurator; //導入依賴的package包/類
public BitExtender() {
	super("Bit Extender", Strings.getter("extenderComponent"));
	setIconName("extender.gif");
	setAttributes(new Attribute[] { ATTR_IN_WIDTH, ATTR_OUT_WIDTH, ATTR_TYPE },
			new Object[] { BitWidth.create(8), BitWidth.create(16), ATTR_TYPE.parse("zero") });
	setFacingAttribute(StdAttr.FACING);
	setKeyConfigurator(JoinedConfigurator.create(new BitWidthConfigurator(ATTR_OUT_WIDTH),
			new BitWidthConfigurator(ATTR_IN_WIDTH, 1, Value.MAX_WIDTH, 0)));
	setOffsetBounds(Bounds.create(-40, -20, 40, 40));
}
 
開發者ID:LogisimIt,項目名稱:Logisim,代碼行數:11,代碼來源:BitExtender.java

示例5: Pin

import com.cburch.logisim.tools.key.JoinedConfigurator; //導入依賴的package包/類
public Pin() {
	super("Pin", Strings.getter("pinComponent"));
	setFacingAttribute(StdAttr.FACING);
	setKeyConfigurator(JoinedConfigurator.create(new BitWidthConfigurator(StdAttr.WIDTH),
			new DirectionConfigurator(ATTR_LABEL_LOC, InputEvent.ALT_DOWN_MASK)));
	setInstanceLogger(PinLogger.class);
	setInstancePoker(PinPoker.class);
}
 
開發者ID:LogisimIt,項目名稱:Logisim,代碼行數:9,代碼來源:Pin.java

示例6: Multiplexer

import com.cburch.logisim.tools.key.JoinedConfigurator; //導入依賴的package包/類
public Multiplexer() {
	super("Multiplexer", Strings.getter("multiplexerComponent"));
	setAttributes(
			new Attribute[] { StdAttr.FACING, Plexers.ATTR_SELECT_LOC, Plexers.ATTR_SELECT, StdAttr.WIDTH,
					Plexers.ATTR_DISABLED, Plexers.ATTR_ENABLE },
			new Object[] { Direction.EAST, Plexers.SELECT_BOTTOM_LEFT, Plexers.DEFAULT_SELECT, BitWidth.ONE,
					Plexers.DISABLED_FLOATING, Boolean.FALSE });
	setKeyConfigurator(JoinedConfigurator.create(new BitWidthConfigurator(Plexers.ATTR_SELECT, 1, 5, 0),
			new BitWidthConfigurator(StdAttr.WIDTH)));
	setIconName("multiplexer.gif");
	setFacingAttribute(StdAttr.FACING);
}
 
開發者ID:LogisimIt,項目名稱:Logisim,代碼行數:13,代碼來源:Multiplexer.java

示例7: BitSelector

import com.cburch.logisim.tools.key.JoinedConfigurator; //導入依賴的package包/類
public BitSelector() {
	super("BitSelector", Strings.getter("bitSelectorComponent"));
	setAttributes(new Attribute[] { StdAttr.FACING, StdAttr.WIDTH, GROUP_ATTR },
			new Object[] { Direction.EAST, BitWidth.create(8), BitWidth.ONE });
	setKeyConfigurator(JoinedConfigurator.create(new BitWidthConfigurator(GROUP_ATTR, 1, Value.MAX_WIDTH, 0),
			new BitWidthConfigurator(StdAttr.WIDTH)));

	setIconName("bitSelector.gif");
	setFacingAttribute(StdAttr.FACING);
}
 
開發者ID:LogisimIt,項目名稱:Logisim,代碼行數:11,代碼來源:BitSelector.java

示例8: Demultiplexer

import com.cburch.logisim.tools.key.JoinedConfigurator; //導入依賴的package包/類
public Demultiplexer() {
	super("Demultiplexer", Strings.getter("demultiplexerComponent"));
	setAttributes(
			new Attribute[] { StdAttr.FACING, Plexers.ATTR_SELECT_LOC, Plexers.ATTR_SELECT, StdAttr.WIDTH,
					Plexers.ATTR_TRISTATE, Plexers.ATTR_DISABLED, Plexers.ATTR_ENABLE },
			new Object[] { Direction.EAST, Plexers.SELECT_BOTTOM_LEFT, Plexers.DEFAULT_SELECT, BitWidth.ONE,
					Plexers.DEFAULT_TRISTATE, Plexers.DISABLED_FLOATING, Boolean.FALSE });
	setKeyConfigurator(JoinedConfigurator.create(new BitWidthConfigurator(Plexers.ATTR_SELECT, 1, 5, 0),
			new BitWidthConfigurator(StdAttr.WIDTH)));
	setFacingAttribute(StdAttr.FACING);
	setIconName("demultiplexer.gif");
}
 
開發者ID:LogisimIt,項目名稱:Logisim,代碼行數:13,代碼來源:Demultiplexer.java

示例9: AbstractGate

import com.cburch.logisim.tools.key.JoinedConfigurator; //導入依賴的package包/類
protected AbstractGate(String name, StringGetter desc, boolean isXor) {
	super(name, desc);
	this.isXor = isXor;
	setFacingAttribute(StdAttr.FACING);
	setKeyConfigurator(JoinedConfigurator.create(
			new IntegerConfigurator(GateAttributes.ATTR_INPUTS, 2, GateAttributes.MAX_INPUTS, 0),
			new BitWidthConfigurator(StdAttr.WIDTH)));
}
 
開發者ID:LogisimIt,項目名稱:Logisim,代碼行數:9,代碼來源:AbstractGate.java

示例10: BitAdder

import com.cburch.logisim.tools.key.JoinedConfigurator; //導入依賴的package包/類
public BitAdder() {
	super("BitAdder", Strings.getter("bitAdderComponent"));
	setAttributes(new Attribute[] { StdAttr.WIDTH, NUM_INPUTS },
			new Object[] { BitWidth.create(8), Integer.valueOf(1) });
	setKeyConfigurator(JoinedConfigurator.create(new IntegerConfigurator(NUM_INPUTS, 1, 32, 0),
			new BitWidthConfigurator(StdAttr.WIDTH)));
	setIconName("bitadder.gif");
}
 
開發者ID:LogisimIt,項目名稱:Logisim,代碼行數:9,代碼來源:BitAdder.java

示例11: getFeature

import com.cburch.logisim.tools.key.JoinedConfigurator; //導入依賴的package包/類
@Override
public Object getFeature(Object key, AttributeSet attrs) {
	if (key == FACING_ATTRIBUTE_KEY) {
		return StdAttr.FACING;
	} else if (key == KeyConfigurator.class) {
		KeyConfigurator altConfig = ParallelConfigurator.create(
				new BitWidthConfigurator(SplitterAttributes.ATTR_WIDTH),
				new IntegerConfigurator(SplitterAttributes.ATTR_FANOUT, 1, 32, InputEvent.ALT_DOWN_MASK));
		return JoinedConfigurator.create(new IntegerConfigurator(SplitterAttributes.ATTR_FANOUT, 1, 32, 0),
				altConfig);
	}
	return super.getFeature(key, attrs);
}
 
開發者ID:LogisimIt,項目名稱:Logisim,代碼行數:14,代碼來源:SplitterFactory.java

示例12: ShiftRegister

import com.cburch.logisim.tools.key.JoinedConfigurator; //導入依賴的package包/類
public ShiftRegister() {
	super("Shift Register", Strings.getter("shiftRegisterComponent"));
	setAttributes(new Attribute[] { StdAttr.WIDTH, ATTR_LENGTH, ATTR_LOAD,
			StdAttr.EDGE_TRIGGER, StdAttr.LABEL, StdAttr.LABEL_FONT },
			new Object[] { BitWidth.ONE, Integer.valueOf(8), Boolean.TRUE,
					StdAttr.TRIG_RISING, "", StdAttr.DEFAULT_LABEL_FONT });
	setKeyConfigurator(JoinedConfigurator
			.create(new IntegerConfigurator(ATTR_LENGTH, 1, 32, 0),
					new BitWidthConfigurator(StdAttr.WIDTH)));

	setIconName("shiftreg.gif");
	setInstanceLogger(ShiftRegisterLogger.class);
	setInstancePoker(ShiftRegisterPoker.class);
}
 
開發者ID:reds-heig,項目名稱:logisim-evolution,代碼行數:15,代碼來源:ShiftRegister.java

示例13: Mem

import com.cburch.logisim.tools.key.JoinedConfigurator; //導入依賴的package包/類
Mem(String name, StringGetter desc, int extraPorts) {
	super(name, desc);
	currentInstanceFiles = new WeakHashMap<Instance, File>();
	setInstancePoker(MemPoker.class);
	setKeyConfigurator(JoinedConfigurator.create(new BitWidthConfigurator(
			ADDR_ATTR, 2, 24, 0), new BitWidthConfigurator(DATA_ATTR)));

	setOffsetBounds(Bounds.create(-140, -40, 140, 80));
}
 
開發者ID:reds-heig,項目名稱:logisim-evolution,代碼行數:10,代碼來源:Mem.java

示例14: BitExtender

import com.cburch.logisim.tools.key.JoinedConfigurator; //導入依賴的package包/類
public BitExtender() {
	super("Bit Extender", Strings.getter("extenderComponent"));
	setIconName("extender.gif");
	setAttributes(new Attribute[] { ATTR_IN_WIDTH, ATTR_OUT_WIDTH,
			ATTR_TYPE },
			new Object[] { BitWidth.create(8), BitWidth.create(16),
					ATTR_TYPE.parse("sign") });
	setFacingAttribute(StdAttr.FACING);
	setKeyConfigurator(JoinedConfigurator.create(new BitWidthConfigurator(
			ATTR_OUT_WIDTH), new BitWidthConfigurator(ATTR_IN_WIDTH, 1,
			Value.MAX_WIDTH, 0)));
	setOffsetBounds(Bounds.create(-40, -20, 40, 40));
}
 
開發者ID:reds-heig,項目名稱:logisim-evolution,代碼行數:14,代碼來源:BitExtender.java

示例15: Pin

import com.cburch.logisim.tools.key.JoinedConfigurator; //導入依賴的package包/類
public Pin() {
	super("Pin", Strings.getter("pinComponent"));
	setFacingAttribute(StdAttr.FACING);
	setKeyConfigurator(JoinedConfigurator.create(new BitWidthConfigurator(
			StdAttr.WIDTH), new DirectionConfigurator(ATTR_LABEL_LOC,
			KeyEvent.ALT_DOWN_MASK)));
	setInstanceLogger(PinLogger.class);
	setInstancePoker(PinPoker.class);
}
 
開發者ID:reds-heig,項目名稱:logisim-evolution,代碼行數:10,代碼來源:Pin.java


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