本文整理匯總了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);
}
示例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);
}
示例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));
}
示例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));
}
示例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);
}
示例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);
}
示例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);
}
示例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");
}
示例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)));
}
示例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");
}
示例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);
}
示例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);
}
示例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));
}
示例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));
}
示例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);
}