本文整理汇总了Java中org.opensourcephysics.controls.XMLControl.getBoolean方法的典型用法代码示例。如果您正苦于以下问题:Java XMLControl.getBoolean方法的具体用法?Java XMLControl.getBoolean怎么用?Java XMLControl.getBoolean使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类org.opensourcephysics.controls.XMLControl
的用法示例。
在下文中一共展示了XMLControl.getBoolean方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: loadObject
import org.opensourcephysics.controls.XMLControl; //导入方法依赖的package包/类
public Object loadObject(XMLControl control, Object obj) {
DatasetManager dsm = (DatasetManager) obj;
dsm.connected = control.getBoolean("connected"); //$NON-NLS-1$
dsm.sorted = control.getBoolean("sorted"); //$NON-NLS-1$
dsm.markerShape = control.getInt("maker_shape"); //$NON-NLS-1$
dsm.stride = control.getInt("stride"); //$NON-NLS-1$
dsm.linked = control.getBoolean("linked"); //$NON-NLS-1$
dsm.xColumnName = control.getString("x_column_name"); //$NON-NLS-1$
dsm.yColumnName = control.getString("y_column_name"); //$NON-NLS-1$
dsm.setName(control.getString("data_name")); //$NON-NLS-1$
if (control.getPropertyNames().contains("id")) { //$NON-NLS-1$
dsm.setID(control.getInt("id")); //$NON-NLS-1$
}
dsm.removeDatasets();
Collection<?> datasets = Collection.class.cast(control.getObject("datasets")); //$NON-NLS-1$
if(datasets!=null) {
Iterator<?> it = datasets.iterator();
while(it.hasNext()) {
dsm.datasets.add((Dataset) it.next());
}
}
return obj;
}
示例2: loadObject
import org.opensourcephysics.controls.XMLControl; //导入方法依赖的package包/类
/**
* Loads the object with data from the control.
*
* @param control XMLControl
* @param obj Object
* @return Object
*/
public Object loadObject(XMLControl control, Object obj) {
DrawingFrame frame = ((DrawingFrame) obj);
DrawingPanel panel = frame.getDrawingPanel();
panel.clear();
XMLControl panelControl = control.getChildControl("drawing panel"); //$NON-NLS-1$
panelControl.loadObject(panel);
panel.repaint();
frame.setTitle(control.getString("title")); //$NON-NLS-1$
frame.setLocation(control.getInt("location x"), control.getInt("location y")); //$NON-NLS-1$ //$NON-NLS-2$
frame.setSize(control.getInt("width"), control.getInt("height")); //$NON-NLS-1$ //$NON-NLS-2$
if(control.getBoolean("showing")) { //$NON-NLS-1$
frame.setVisible(true);
}
return obj;
}
示例3: loadObject
import org.opensourcephysics.controls.XMLControl; //导入方法依赖的package包/类
/**
* Loads a DrawingPanel with data from an XMLControl.
*
* @param control the control
* @param obj the object
* @return the loaded object
*/
public Object loadObject(XMLControl control, Object obj) {
DrawingPanel panel = (DrawingPanel) obj;
double xmin = control.getDouble("preferred x min"); //$NON-NLS-1$
double xmax = control.getDouble("preferred x max"); //$NON-NLS-1$
double ymin = control.getDouble("preferred y min"); //$NON-NLS-1$
double ymax = control.getDouble("preferred y max"); //$NON-NLS-1$
panel.setPreferredMinMax(xmin, xmax, ymin, ymax); // this sets autoscale to false
panel.squareAspect = control.getBoolean("square aspect"); //$NON-NLS-1$
if(control.getBoolean("autoscale x")) { //$NON-NLS-1$
panel.setAutoscaleX(true);
}
if(control.getBoolean("autoscale y")) { //$NON-NLS-1$
panel.setAutoscaleY(true);
}
// load the drawables
Collection<?> drawables = Collection.class.cast(control.getObject("drawables")); //$NON-NLS-1$
if(drawables!=null) {
panel.clear();
Iterator<?> it = drawables.iterator();
while(it.hasNext()) {
panel.addDrawable((Drawable) it.next());
}
}
return obj;
}
示例4: loadObject
import org.opensourcephysics.controls.XMLControl; //导入方法依赖的package包/类
public Object loadObject(XMLControl control, Object obj) {
Histogram his = (Histogram) obj;
double[] bins = (double[]) control.getObject("bins"); //$NON-NLS-1$
double[] vals = (double[]) control.getObject("vals"); //$NON-NLS-1$
his.name = control.getString("name"); //$NON-NLS-1$
his.xColumnName = control.getString("x_column_name"); //$NON-NLS-1$
his.yColumnName = control.getString("y_column_name"); //$NON-NLS-1$
his.binColumnName = control.getString("bin_column_name"); //$NON-NLS-1$
his.logScale = control.getBoolean("log_scale"); //$NON-NLS-1$
his.discrete = control.getBoolean("discrete"); //$NON-NLS-1$
his.adjustForWidth = control.getBoolean("adjust_for_width"); //$NON-NLS-1$
his.binFillColor = (Color) control.getObject("bin_fill_color"); //$NON-NLS-1$
his.binEdgeColor = (Color) control.getObject("bin_edge_color"); //$NON-NLS-1$
his.binStyle = control.getInt("bin_style"); //$NON-NLS-1$
his.binWidth = control.getDouble("bin_width"); //$NON-NLS-1$
his.binOffset = control.getDouble("bin_offset"); //$NON-NLS-1$
his.adjustForWidth = control.getBoolean("adjust_for_width"); //$NON-NLS-1$
if((bins!=null)&&(vals!=null)) {
for(int i = 0, n = bins.length; i<n; i++) {
his.append(bins[i], vals[i]);
}
}
return obj;
}
示例5: send
import org.opensourcephysics.controls.XMLControl; //导入方法依赖的package包/类
@Override
public void send(Job job, Tool replyTo) throws RemoteException {
XMLControl control = new XMLControlElement();
control.readXML(job.getXML());
if (control.failedToRead()) return;
int sourceID = control.getInt("sourceID"); //$NON-NLS-1$
if (control.getBoolean("handshake")) { //$NON-NLS-1$
connected = true;
support.firePropertyChange("tracker_ready", sourceID, null); //$NON-NLS-1$
}
else if (control.getBoolean("exiting")) { //$NON-NLS-1$
remoteTool = null;
connected = false;
support.firePropertyChange("tracker_exited", null, null); //$NON-NLS-1$
}
}
示例6: loadObject
import org.opensourcephysics.controls.XMLControl; //导入方法依赖的package包/类
public Object loadObject(XMLControl control, Object obj) {
DrawingFrame3D frame3D = ((DrawingFrame3D) obj);
javax.swing.JFrame frame = frame3D.getJFrame();
DrawingPanel3D panel = frame3D.getDrawingPanel3D();
panel.removeAllElements();
XMLControl panelControl = control.getChildControl("drawing panel"); //$NON-NLS-1$
panelControl.loadObject(panel);
panel.repaint();
frame.setTitle(control.getString("title")); //$NON-NLS-1$
frame.setLocation(control.getInt("location x"), control.getInt("location y")); //$NON-NLS-1$ //$NON-NLS-2$
frame.setSize(control.getInt("width"), control.getInt("height")); //$NON-NLS-1$ //$NON-NLS-2$
if(control.getBoolean("showing")) { //$NON-NLS-1$
frame.setVisible(true);
}
return obj;
}
示例7: loadObject
import org.opensourcephysics.controls.XMLControl; //导入方法依赖的package包/类
public Object loadObject(XMLControl control, Object obj) {
InteractiveTextLine interactiveTextLine = (InteractiveTextLine) obj;
double x = control.getDouble("x"); //$NON-NLS-1$
double y = control.getDouble("y"); //$NON-NLS-1$
interactiveTextLine.setText(control.getString("text")); //$NON-NLS-1$
interactiveTextLine.enabled = control.getBoolean("is enabled"); //$NON-NLS-1$
interactiveTextLine.enableMeasure = control.getBoolean("is measured"); //$NON-NLS-1$
interactiveTextLine.color = (Color) control.getObject("color"); //$NON-NLS-1$
interactiveTextLine.setXY(x, y);
return obj;
}
示例8: loadObject
import org.opensourcephysics.controls.XMLControl; //导入方法依赖的package包/类
/**
* Loads a filter with data from an XMLControl.
*
* @param control the control
* @param obj the filter
* @return the loaded object
*/
public Object loadObject(XMLControl control, Object obj) {
final RotateFilter filter = (RotateFilter) obj;
String typeName = control.getString("rotation"); //$NON-NLS-1$ // could be null
for (int i = 0; i<RotateFilter.typeNames.length; i++) {
if (RotateFilter.typeNames[i].equals(typeName))
filter.rotationType = RotateFilter.types[i];
}
filter.reverse = control.getBoolean("reverse"); //$NON-NLS-1$
filter.inspectorX = control.getInt("inspector_x"); //$NON-NLS-1$
filter.inspectorY = control.getInt("inspector_y"); //$NON-NLS-1$
return obj;
}
示例9: createObject
import org.opensourcephysics.controls.XMLControl; //导入方法依赖的package包/类
/**
* createObject
*
* @param control XMLControl
* @return Object
*/
public Object createObject(XMLControl control) {
DrawingFrame frame = new DrawingFrame();
frame.setTitle(control.getString("title")); //$NON-NLS-1$
frame.setLocation(control.getInt("location x"), control.getInt("location y")); //$NON-NLS-1$ //$NON-NLS-2$
frame.setSize(control.getInt("width"), control.getInt("height")); //$NON-NLS-1$ //$NON-NLS-2$
if(control.getBoolean("showing")) { //$NON-NLS-1$
frame.setVisible(true);
}
return frame;
}
示例10: loadObject
import org.opensourcephysics.controls.XMLControl; //导入方法依赖的package包/类
public Object loadObject(XMLControl control, Object obj) {
DataColumn column = (DataColumn) obj;
Dataset.getLoader().loadObject(control, column);
if (control.getPropertyNames().contains("shift")) { //$NON-NLS-1$
column.shift = control.getDouble("shift"); //$NON-NLS-1$
}
column.deletable = control.getBoolean("deletable"); //$NON-NLS-1$
return obj;
}
示例11: loadObject
import org.opensourcephysics.controls.XMLControl; //导入方法依赖的package包/类
public Object loadObject(XMLControl control, Object obj) {
Stripchart dataset = (Stripchart) obj;
dataset.xrange = control.getDouble("x_range"); //$NON-NLS-1$
dataset.yrange = control.getDouble("y_range"); //$NON-NLS-1$
dataset.lastx = control.getDouble("last_x"); //$NON-NLS-1$
dataset.rightToLeft = control.getBoolean("right_to_left"); //$NON-NLS-1$
super.loadObject(control, obj);
return obj;
}
示例12: loadObject
import org.opensourcephysics.controls.XMLControl; //导入方法依赖的package包/类
public Object loadObject(XMLControl control, Object obj) {
InteractiveCenteredArrow arrow = (InteractiveCenteredArrow) obj;
double x = control.getDouble("x"); //$NON-NLS-1$
double y = control.getDouble("y"); //$NON-NLS-1$
double w = control.getDouble("width"); //$NON-NLS-1$
double h = control.getDouble("height"); //$NON-NLS-1$
arrow.enabled = control.getBoolean("is enabled"); //$NON-NLS-1$
arrow.enableMeasure = control.getBoolean("is measured"); //$NON-NLS-1$
arrow.color = (Color) control.getObject("color"); //$NON-NLS-1$
arrow.setXY(x, y);
arrow.setWidthHeight(w, h);
return obj;
}
示例13: loadObject
import org.opensourcephysics.controls.XMLControl; //导入方法依赖的package包/类
public Object loadObject(XMLControl control, Object obj) {
DrawableTextLine drawableTextLine = (DrawableTextLine) obj;
drawableTextLine.x = control.getDouble("x"); //$NON-NLS-1$
drawableTextLine.y = control.getDouble("y"); //$NON-NLS-1$
drawableTextLine.theta = control.getDouble("theta"); //$NON-NLS-1$
drawableTextLine.pixelXY = control.getBoolean("pixel position"); //$NON-NLS-1$
drawableTextLine.setText(control.getString("text")); //$NON-NLS-1$
drawableTextLine.color = (Color) control.getObject("color"); //$NON-NLS-1$
return obj;
}
示例14: loadObject
import org.opensourcephysics.controls.XMLControl; //导入方法依赖的package包/类
public Object loadObject(XMLControl control, Object obj) {
InteractiveArrow arrow = (InteractiveArrow) obj;
double x = control.getDouble("x"); //$NON-NLS-1$
double y = control.getDouble("y"); //$NON-NLS-1$
double w = control.getDouble("width"); //$NON-NLS-1$
double h = control.getDouble("height"); //$NON-NLS-1$
arrow.enabled = control.getBoolean("is enabled"); //$NON-NLS-1$
arrow.enableMeasure = control.getBoolean("is measured"); //$NON-NLS-1$
arrow.color = (Color) control.getObject("color"); //$NON-NLS-1$
arrow.setXY(x, y);
arrow.setWidthHeight(w, h);
return obj;
}
示例15: loadObject
import org.opensourcephysics.controls.XMLControl; //导入方法依赖的package包/类
public Object loadObject(XMLControl control, Object obj) {
Trail trail = (Trail) obj;
trail.connected = control.getBoolean("connected"); //$NON-NLS-1$
trail.color = (Color) control.getObject("color"); //$NON-NLS-1$
trail.numpts = control.getInt("number of pts"); //$NON-NLS-1$
trail.generalPath = (GeneralPath) control.getObject("general path"); //$NON-NLS-1$
return obj;
}