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