本文整理汇总了Java中com.cburch.logisim.proj.Project.addCircuitListener方法的典型用法代码示例。如果您正苦于以下问题:Java Project.addCircuitListener方法的具体用法?Java Project.addCircuitListener怎么用?Java Project.addCircuitListener使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类com.cburch.logisim.proj.Project
的用法示例。
在下文中一共展示了Project.addCircuitListener方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: Selection
import com.cburch.logisim.proj.Project; //导入方法依赖的package包/类
public Selection(Project proj, Canvas canvas) {
super(proj);
myListener = new MyListener();
attrs = new SelectionAttributes(canvas, this);
proj.addProjectListener(myListener);
proj.addCircuitListener(myListener);
}
示例2: Canvas
import com.cburch.logisim.proj.Project; //导入方法依赖的package包/类
public Canvas(Project proj) {
this.proj = proj;
this.selection = new Selection(proj, this);
this.painter = new CanvasPainter(this);
this.oldPreferredSize = null;
this.paintThread = new CanvasPaintThread(this);
this.mappings = proj.getOptions().getMouseMappings();
this.canvasPane = null;
this.tickCounter = new TickCounter();
setBackground(Color.white);
setPreferredSize(new Dimension(Integer.MAX_VALUE, Integer.MAX_VALUE));
addMouseListener(myListener);
addMouseMotionListener(myListener);
addMouseWheelListener(myListener);
addKeyListener(myListener);
proj.addProjectListener(myProjectListener);
proj.addLibraryListener(myProjectListener);
proj.addCircuitListener(myProjectListener);
proj.getSimulator().addSimulatorListener(tickCounter);
selection.addListener(myProjectListener);
LocaleManager.addLocaleListener(this);
AttributeSet options = proj.getOptions().getAttributeSet();
options.addAttributeListener(myProjectListener);
AppPreferences.COMPONENT_TIPS.addPropertyChangeListener(myListener);
AppPreferences.GATE_SHAPE.addPropertyChangeListener(myListener);
AppPreferences.ANTI_ALIASING.addPropertyChangeListener(myListener);
AppPreferences.FILL_COMPONENT_BACKGROUND.addPropertyChangeListener(myListener);
AppPreferences.SEND_DATA.addPropertyChangeListener(myListener);
AppPreferences.SHOW_TICK_RATE.addPropertyChangeListener(myListener);
AppPreferences.LOOK_AND_FEEL.addPropertyChangeListener(myListener);
AppPreferences.GRAPHICS_ACCELERATION.addPropertyChangeListener(myListener);
loadOptions(options);
paintThread.start();
}