本文整理汇总了Java中sim.display.Controller类的典型用法代码示例。如果您正苦于以下问题:Java Controller类的具体用法?Java Controller怎么用?Java Controller使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
Controller类属于sim.display包,在下文中一共展示了Controller类的18个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的Java代码示例。
示例1: init
import sim.display.Controller; //导入依赖的package包/类
@Override
public void init(Controller c) {
super.init(c);
chart = new sim.util.media.chart.TimeSeriesChartGenerator();
chart.setTitle(title);
chart.setRangeAxisLabel(ylabel);
chart.setDomainAxisLabel(xlabel);
JFrame frame = chart.createFrame(this);
// perhaps you might move the chart to where you like.
frame.setVisible(false);
frame.pack();
frame.setIconImage(BTSimWithUI.getLocoIcon().getImage());
frame.setLocation((int) GraphicsEnvironment.getLocalGraphicsEnvironment().getMaximumWindowBounds().getWidth() - frame.getWidth(), 0);
displayFrame=frame;
// display.attach(warningsPortrayal, "Warnings");
}
开发者ID:gsi-upm,项目名称:BigTweet,代码行数:21,代码来源:UsersStatesChart.java
示例2: init
import sim.display.Controller; //导入依赖的package包/类
@Override
public void init(Controller c) {
super.init(c);
// make the displayer
display = new Display2D(600, 600, this);
// turn off clipping
display.setClipping(false);
displayFrame = display.createFrame();
displayFrame.setTitle("Network Cooperation Display");
c.registerFrame(displayFrame); // register the frame so it appears in
// the "Display" list
displayFrame.setVisible(true);
display.attach(networkPortrayal, "Agents");
}
开发者ID:rwth-acis,项目名称:REST-OCD-Services,代码行数:18,代码来源:SimulationWithUI.java
示例3: init
import sim.display.Controller; //导入依赖的package包/类
@Override
public void init(Controller c) {
super.init(c);
chart = new sim.util.media.chart.TimeSeriesChartGenerator();
chart.setTitle(title);
chart.setRangeAxisLabel(xlabel);
chart.setDomainAxisLabel(ylabel);
JFrame frame = chart.createFrame(this);
// perhaps you might move the chart to where you like.
frame.setVisible(true);
frame.pack();
// display.attach(warningsPortrayal, "Warnings");
}
开发者ID:emilioserra,项目名称:UbikSim,代码行数:18,代码来源:GenericChart.java
示例4: init
import sim.display.Controller; //导入依赖的package包/类
public void init(Controller c){
super.init(c);
display = new Display2D(600,600,this);
display.setClipping(false);
displayFrame = display.createFrame();
displayFrame.setTitle("Schoolyard Display");
c.registerFrame(displayFrame); // so the frame appears in the "Display" list
displayFrame.setVisible(true);
display.attach( yardPortrayal, "Yard" );
}
开发者ID:EdgarLopezPhD,项目名称:PaySim,代码行数:11,代码来源:PaySimWithUI.java
示例5: init
import sim.display.Controller; //导入依赖的package包/类
public void init(Controller c) {
super.init(c);
ProximitySimulation sim = (ProximitySimulation) state;
display = new Display2D(sim.width, sim.height, this);
display.setClipping(false);
displayFrame = display.createFrame();
c.registerFrame(displayFrame); // register the frame so it appears in the "Display" list
displayFrame.setVisible(true);
display.attach(socialPortrayal, "Social");
display.attach(spacePortrayal, "Space"); // attach the portrayals
}
开发者ID:casific,项目名称:murmur,代码行数:13,代码来源:ProximitySimulationWithGUI.java
示例6: init
import sim.display.Controller; //导入依赖的package包/类
public void init(Controller c) {
super.init(c);
// MessagePropagationSimulation sim = (MessagePropagationSimulation) state;
// display = new Display2D(sim.width, sim.height, this);
// display.setClipping(false);
// displayFrame = display.createFrame();
// c.registerFrame(displayFrame); // register the frame so it appears in the "Display" list
// displayFrame.setVisible(true);
// display.attach(socialPortrayal, "Social");
// display.attach(spacePortrayal, "Space"); // attach the portrayals
}
开发者ID:casific,项目名称:murmur,代码行数:13,代码来源:MessagePropagationSimulationWithGUI.java
示例7: init
import sim.display.Controller; //导入依赖的package包/类
@Override
public void init(final Controller c) {
super.init(c);
final int
screenWidth = (int) Math.round(Toolkit.getDefaultToolkit().getScreenSize().getWidth()),
screenHeight = (int) Math.round(Toolkit.getDefaultToolkit().getScreenSize().getHeight()),
graphFrameWidth = screenWidth / 2,
graphFrameHeight = screenHeight / 2;
// Graphs
chartFrame = new JFrame("Model Statistics [" + modelName + "]");
c.registerFrame(chartFrame);
chartFrame.pack();
chartFrame.setSize(graphFrameWidth, graphFrameHeight);
chartFrame.setVisible(true);
// Component Visualization
final Display2D display = new Display2D(screenWidth / 4, screenHeight / 4, this);
display.setClipping(false);
subEconomyVisualizationFrame = display.createFrame();
subEconomyVisualizationFrame.setTitle("Components");
c.registerFrame(subEconomyVisualizationFrame);
subEconomyVisualizationFrame.pack();
subEconomyVisualizationFrame.setVisible(true);
final JTabbedPane tabbedPane = new JTabbedPane();
chartFrame.add(tabbedPane);
setupCharts();
addTabs(tabbedPane);
final Console console = getConsole();
console.setLocation(chartFrame.getLocationOnScreen().x + chartFrame.getWidth(), 0);
console.setSize(150, graphFrameHeight);
}
开发者ID:crisis-economics,项目名称:CRISIS,代码行数:38,代码来源:MasterModelGUI.java
示例8: init
import sim.display.Controller; //导入依赖的package包/类
@Override
public void init(Controller controller) {
super.init(controller);
testDisplay = new Display2D(600,600,this);
testDisplay.setClipping(false);
displayFrame = testDisplay.createFrame();
controller.registerFrame(displayFrame);
displayFrame.setVisible(true);
//initialize the selector
Bag inspectors = new Bag(1); inspectors.add(Scenario.scenarioSelector(state));
Bag names = new Bag(1); names.add("Scenario controller");
controller.setInspectors(inspectors,names);
}
开发者ID:CarrKnight,项目名称:MacroIIDiscrete,代码行数:20,代码来源:MacroIIGUI.java
示例9: init
import sim.display.Controller; //导入依赖的package包/类
@Override
public void init(Controller controller) {
super.init(controller);
//wood chart
upstreamPriceChart = new sim.util.media.chart.TimeSeriesChartGenerator();
upstreamPriceChart.setTitle("Wood Prices");
upstreamPriceChart.setXAxisLabel("Time");
upstreamPriceChart.setYAxisLabel("Price");
upstreamPriceFrame = upstreamPriceChart.createFrame();
upstreamPriceFrame.setLocationByPlatform(true);
upstreamPriceFrame.setVisible(true);
upstreamPriceFrame.pack();
upstreamPriceFrame.setDefaultCloseOperation(WindowConstants.HIDE_ON_CLOSE);
controller.registerFrame(upstreamPriceFrame);
//furniture chart
downstreamPriceChart = new sim.util.media.chart.TimeSeriesChartGenerator();
downstreamPriceChart.setTitle("Furniture Prices");
downstreamPriceChart.setXAxisLabel("Time");
downstreamPriceChart.setYAxisLabel("Price");
downstreamPriceFrame = downstreamPriceChart.createFrame();
downstreamPriceFrame.setLocationByPlatform(true);
downstreamPriceFrame.setVisible(true);
downstreamPriceFrame.pack();
downstreamPriceFrame.setDefaultCloseOperation(WindowConstants.HIDE_ON_CLOSE);
controller.registerFrame(downstreamPriceFrame);
inputProductionChart = new sim.util.media.chart.TimeSeriesChartGenerator();
inputProductionChart.setTitle("Wood Quantity");
inputProductionChart.setXAxisLabel("Time");
inputProductionChart.setYAxisLabel("Quantity");
inputProductionFrame = inputProductionChart.createFrame();
inputProductionFrame.setLocationByPlatform(true);
inputProductionFrame.setVisible(true);
inputProductionFrame.pack();
inputProductionFrame.setDefaultCloseOperation(WindowConstants.HIDE_ON_CLOSE);
controller.registerFrame(inputProductionFrame);
//factory!
factory = getScenarioFactory();
settingPanel = new JFrame();
settingPanel.setContentPane(factory.getControlPanel());
settingPanel.setSize(400, 800);
settingPanel.setName("Settings Panel");
// controller.registerFrame(settingPanel);
settingPanel.setLocationByPlatform(true);
settingPanel.setVisible(true);
settingPanel.setDefaultCloseOperation(WindowConstants.HIDE_ON_CLOSE);
}
开发者ID:CarrKnight,项目名称:MacroIIDiscrete,代码行数:56,代码来源:UpstreamMonopolistGUI.java
示例10: init
import sim.display.Controller; //导入依赖的package包/类
@Override
public void init(Controller controller) {
super.init(controller);
//chart
priceChart = new sim.util.media.chart.TimeSeriesChartGenerator();
priceChart.setTitle("Monopolist Prices");
priceChart.setXAxisLabel("Time");
priceChart.setYAxisLabel("Price");
priceChartFrame = priceChart.createFrame();
priceChartFrame.setLocationByPlatform(true);
priceChartFrame.setVisible(true);
priceChartFrame.pack();
controller.registerFrame(priceChartFrame);
priceChartFrame.setDefaultCloseOperation(WindowConstants.HIDE_ON_CLOSE);
quantityChart = new sim.util.media.chart.TimeSeriesChartGenerator();
quantityChart.setTitle("Monopolist Quantities");
quantityChart.setXAxisLabel("Time");
quantityChart.setYAxisLabel("Quantity");
quantityFrame = quantityChart.createFrame();
quantityFrame.setLocationByPlatform(true);
quantityFrame.setVisible(true);
quantityFrame.pack();
controller.registerFrame(quantityFrame);
quantityFrame.setDefaultCloseOperation(WindowConstants.HIDE_ON_CLOSE);
//factory!
factory = new MonopolistScenarioFactory();
settingPanel = new JFrame();
settingPanel.setContentPane(factory.getSettingPanel());
settingPanel.setSize(400, 800);
settingPanel.setName("Settings Panel");
// controller.registerFrame(settingPanel);
settingPanel.setLocationByPlatform(true);
settingPanel.setVisible(true);
settingPanel.setDefaultCloseOperation(WindowConstants.HIDE_ON_CLOSE);
}
开发者ID:CarrKnight,项目名称:MacroIIDiscrete,代码行数:46,代码来源:MonopolistGUI.java
示例11: init
import sim.display.Controller; //导入依赖的package包/类
public void init(Controller c) {
super.init(c);
// Configure display 2D
this.display2D = new Display2D(200,
200, this);
// this.display2D = new Display2D(this.simulation.getNetworkDimension(),
// this.simulation.getNetworkDimension(), this);
this.display2D.setScale(3);
this.display2D.setClipping(false);
this.networkFrame2D = this.display2D.createFrame();
this.networkFrame2D.setTitle("Twitter - 2D");
c.registerFrame(this.networkFrame2D);
this.networkFrame2D.setVisible(true);
this.display2D.attach(this.networkPortrayal2D, "Links");
this.display2D.attach(this.usersPortrayal2D, "Users");
// Configure display 3D
this.display3D = new Display3D(600,
600, this);
// this.display3D = new Display3D(this.simulation.getNetworkDimension(),
// this.simulation.getNetworkDimension(), this);
this.display3D.scale(0.01);
this.display3D.setBackdrop(Color.white);
this.networkFrame3D = this.display3D.createFrame();
this.networkFrame3D.setTitle("Twitter - 3D");
c.registerFrame(this.networkFrame3D);
this.networkFrame3D.setVisible(true);
this.display3D.setShowsAxes(false);
this.display3D.attach(this.networkPortrayal3D, "Links");
this.display3D.attach(this.usersPortrayal3D, "Users");
// Prepare displays
this.display2D.reset();
this.display2D.setBackdrop(Color.white);
this.display2D.repaint();
this.networkFrame2D.setLocation(100, 100);
this.display3D.reset();
this.display3D.setBackdrop(Color.white);
this.display3D.repaint();
this.networkFrame3D.setLocation(300, 300);
}
开发者ID:gsi-upm,项目名称:TwitterSimulator,代码行数:48,代码来源:TwitterSimulationGUI.java
示例12: init
import sim.display.Controller; //导入依赖的package包/类
@Override
public void init(final Controller c) {
super.init(c);
}
开发者ID:emilioserra,项目名称:UbikSim,代码行数:6,代码来源:SimExampleWithGUI.java
示例13: createController
import sim.display.Controller; //导入依赖的package包/类
public Controller createController() {
Console console = new Console(this);
console.setVisible(true);
return console;
}
开发者ID:gsi-upm,项目名称:Shanks,代码行数:6,代码来源:ShanksSimulation3DGUI.java
示例14: createController
import sim.display.Controller; //导入依赖的package包/类
/**
* Creates and returns a controller ready for the user to manipulate. By
* default this method creates a Console, sets it visible, and returns it.
* You can override this to provide some other kind of controller.
*/
public Controller createController() {
Console console = new Console(this);
console.setVisible(true);
return console;
}
开发者ID:gsi-upm,项目名称:Shanks,代码行数:11,代码来源:ShanksSimulation2DGUI.java
示例15: init
import sim.display.Controller; //导入依赖的package包/类
/**
* create the right displays
* @param controller the parent-given controller object
*/
@Override
public void init(Controller controller) {
super.init(controller);
}
开发者ID:CarrKnight,项目名称:POSEIDON,代码行数:11,代码来源:HeatmapTester.java
示例16: init
import sim.display.Controller; //导入依赖的package包/类
/**
* create the right displays
* @param controller the parent-given controller object
*/
@Override
public void init(Controller controller) {
super.init(controller);
}
开发者ID:CarrKnight,项目名称:POSEIDON,代码行数:12,代码来源:FishGUI.java
示例17: UsersStatesChart
import sim.display.Controller; //导入依赖的package包/类
/**
*
* @param state
* @param title Title of ghe chart
* @param objectinfo Object with information of x and y (methodx and y)
* @param x Double to be read in chart, don't change this reference! only
* its value (attribute val)
* @param y Double to be read in chart, don't change this reference! only
* its value (attribute val)
* @param xlabel label for x
* @param ylabel label for y
*/
public UsersStatesChart(BTSim bt, Controller c) {
super(bt);
this.bt = bt;
this.init(c);
this.start();
}
开发者ID:gsi-upm,项目名称:BigTweet,代码行数:19,代码来源:UsersStatesChart.java
示例18: getController
import sim.display.Controller; //导入依赖的package包/类
/**
* The controller of the gui is useful to handle charts
* (reset charts) and their data.
*
* @return
*/
public Controller getController() {
return this.controller;
}
开发者ID:gsi-upm,项目名称:TwitterSimulator,代码行数:10,代码来源:TwitterSimulationGUI.java
注:本文中的sim.display.Controller类示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 |
请发表评论