当前位置: 首页>>代码示例>>Java>>正文


Java PropertySheet类代码示例

本文整理汇总了Java中org.controlsfx.control.PropertySheet的典型用法代码示例。如果您正苦于以下问题:Java PropertySheet类的具体用法?Java PropertySheet怎么用?Java PropertySheet使用的例子?那么, 这里精选的类代码示例或许可以为您提供帮助。


PropertySheet类属于org.controlsfx.control包,在下文中一共展示了PropertySheet类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。

示例1: initialize

import org.controlsfx.control.PropertySheet; //导入依赖的package包/类
@FXML
void initialize() {
	Callback<Item, PropertyEditor<?>> oldFactory = propertySheet.getPropertyEditorFactory();
	propertySheet.setPropertyEditorFactory(new Callback<PropertySheet.Item, PropertyEditor<?>>() {
		@Override
		public PropertyEditor<?> call(PropertySheet.Item item) {
			if (item.getValue() instanceof Image) {
				return ImagePropertyEditor.createImageEditor(item);
			}

			return oldFactory.call(item);
		}
	});
	customCssArea.textProperty().addListener(new ChangeListener<String>() {
		@Override
		public void changed(ObservableValue<? extends String> observable, String oldValue, String newValue) {
			if (newValue != null) {
				getProject().setCss(newValue);
				MainWindow.touch();
				queuePreviewUpdate();
			}
		}
	});

	updateFields();
}
 
开发者ID:Quantencomputer,项目名称:cyoastudio,代码行数:27,代码来源:StyleEditor.java

示例2: createTab

import org.controlsfx.control.PropertySheet; //导入依赖的package包/类
private Tab createTab(Field listField) {
    Tab tab = new Tab(listField.getName());

    SplitPane pane = new SplitPane();

    TextField filter = TextFields.createClearableTextField();
    VBox.setMargin(filter, new Insets(2));
    TreeView<Object> elements = createTreeView(listField, filter.textProperty());
    VBox.setVgrow(elements, Priority.ALWAYS);
    PropertySheet properties = createPropertySheet(elements);

    pane.getItems().addAll(new VBox(filter, elements), properties);
    pane.setDividerPositions(0.3);

    tab.setContent(wrap(pane));

    return tab;
}
 
开发者ID:acmi,项目名称:xdat_editor,代码行数:19,代码来源:Controller.java

示例3: getEditor

import org.controlsfx.control.PropertySheet; //导入依赖的package包/类
@SuppressWarnings("unchecked")
private Node getEditor(PropertySheet.Item item) {
    PropertyEditor editor = getSkinnable().getPropertyEditorFactory().call(item);
    if (editor == null) {
        editor = new AbstractPropertyEditor<Object, TextField>(item, new TextField(), true) {
            {
                getEditor().setEditable(false);
                getEditor().setDisable(true);
            }

            @Override
            protected ObservableValue getObservableValue() {
                return getEditor().textProperty();
            }

            @Override
            public void setValue(Object value) {
                getEditor().setText(value == null ? "" : value.toString());
            }
        };
    }
    editor.setValue(item.getValue());
    return editor.getEditor();
}
 
开发者ID:acmi,项目名称:xdat_editor,代码行数:25,代码来源:PropertySheetSkin.java

示例4: ParameterSheetView

import org.controlsfx.control.PropertySheet; //导入依赖的package包/类
@SuppressWarnings({"rawtypes", "unchecked"})
public ParameterSheetView(ParameterSet parameters, ValidationSupport validationSupport) {

  super((ObservableList) FXCollections.observableList(parameters.getParameters()));

  this.parameters = parameters;

  setModeSwitcherVisible(false);
  setSearchBoxVisible(false);
  setMode(PropertySheet.Mode.NAME);
  setPrefSize(600.0, 400.0);

  // Set editor factory to keep track of which editing component belongs
  // to which parameter
  this.editorFactory = new ParameterEditorFactory(validationSupport);
  setPropertyEditorFactory(editorFactory);

}
 
开发者ID:mzmine,项目名称:mzmine3,代码行数:19,代码来源:ParameterSheetView.java

示例5: call

import org.controlsfx.control.PropertySheet; //导入依赖的package包/类
@Override
public PropertyEditor<?> call(PropertySheet.Item item) {

  if (!(item instanceof Parameter))
    throw new IllegalArgumentException(
        "This ParameterEditorFactory can be only used for Parameter instances");

  PropertyEditor<?> editor = super.call(item);

  // Save the reference for the editor
  editorsMap.put(item, editor);

  if (editor instanceof ParameterEditor) {
    addValidator(validationSupport, (Parameter<?>) item, (ParameterEditor<?>) editor);
  }

  return editor;
}
 
开发者ID:mzmine,项目名称:mzmine3,代码行数:19,代码来源:ParameterEditorFactory.java

示例6: PercentEditor

import org.controlsfx.control.PropertySheet; //导入依赖的package包/类
public PercentEditor(PropertySheet.Item parameter) {
  if (!(parameter instanceof PercentParameter))
    throw new IllegalArgumentException();

  // The percent field
  percentField = new TextField();

  // The percent sign
  Label signLabel = new Label("%");

  // FlowPane setting
  setHgap(10);

  // Add the elements
  getChildren().addAll(percentField, signLabel);
}
 
开发者ID:mzmine,项目名称:mzmine3,代码行数:17,代码来源:PercentEditor.java

示例7: StringEditor

import org.controlsfx.control.PropertySheet; //导入依赖的package包/类
public StringEditor(PropertySheet.Item parameter) {
  if (!(parameter instanceof StringParameter))
    throw new IllegalArgumentException();

  this.stringParameter = (StringParameter) parameter;

  // The text field
  this.textField = new TextField();
  setCenter(textField);

  // The Add button
  EventHandler<ActionEvent> autoSetAction = stringParameter.getAutoSetAction();
  if (autoSetAction != null) {
    autoButton = new Button("Auto");
    setRight(autoButton);
    setMargin(autoButton, new Insets(0, 0, 0, 10.0));
    autoButton.setOnAction(autoSetAction);
    autoButton.setFocusTraversable(false);
  } else {
    autoButton = null;
  }

}
 
开发者ID:mzmine,项目名称:mzmine3,代码行数:24,代码来源:StringEditor.java

示例8: DoubleRangeEditor

import org.controlsfx.control.PropertySheet; //导入依赖的package包/类
public DoubleRangeEditor(PropertySheet.Item parameter) {
  if (!(parameter instanceof DoubleRangeParameter))
    throw new IllegalArgumentException();

  // Get the number formatter
  DoubleRangeParameter drp = (DoubleRangeParameter) parameter;
  this.numberFormat = drp.getNumberFormat();

  // The minimum value field
  minTxtField = new TextField();

  // The separator label
  Label separatorLabel = new Label("-");

  // The maximum value field
  maxTxtField = new TextField();

  // Spacing setting
  setSpacing(10);

  // Add the elements
  getChildren().addAll(minTxtField, separatorLabel, maxTxtField);
}
 
开发者ID:mzmine,项目名称:mzmine3,代码行数:24,代码来源:DoubleRangeEditor.java

示例9: IntegerRangeEditor

import org.controlsfx.control.PropertySheet; //导入依赖的package包/类
public IntegerRangeEditor(PropertySheet.Item parameter) {
  if (!(parameter instanceof IntegerRangeParameter))
    throw new IllegalArgumentException();

  // The minimum value field
  minTxtField = new TextField();

  // The separator label
  Label separatorLabel = new Label("-");

  // The maximum value field
  maxTxtField = new TextField();

  // Spacing setting
  setSpacing(10);

  // Add the elements
  getChildren().addAll(minTxtField, separatorLabel, maxTxtField);
}
 
开发者ID:mzmine,项目名称:mzmine3,代码行数:20,代码来源:IntegerRangeEditor.java

示例10: MZRangeEditor

import org.controlsfx.control.PropertySheet; //导入依赖的package包/类
public MZRangeEditor(PropertySheet.Item parameter) {
  if (!(parameter instanceof MZRangeParameter))
    throw new IllegalArgumentException();

  // The minimum value field
  minTxtField = new TextField();

  // The separator label
  Label separatorLabel = new Label("-");

  // The maximum value field
  maxTxtField = new TextField();

  // Spacing setting
  setSpacing(10);

  // Add the elements
  getChildren().addAll(minTxtField, separatorLabel, maxTxtField);
}
 
开发者ID:mzmine,项目名称:mzmine3,代码行数:20,代码来源:MZRangeEditor.java

示例11: ToggleEditor

import org.controlsfx.control.PropertySheet; //导入依赖的package包/类
public ToggleEditor(PropertySheet.Item parameter) {
  if (!(parameter instanceof ToggleParameter))
    throw new IllegalArgumentException();

  this.toggleParameter = (ToggleParameter<ValueType>) parameter;

  // The segmented button
  this.segmentedButton = new SegmentedButton();
  segmentedButton.getStyleClass().add(SegmentedButton.STYLE_CLASS_DARK);

  // The toggle buttons
  toggleValues = this.toggleParameter.getToggleValues();
  for (ValueType toggleValue : toggleValues) {
    segmentedButton.getButtons().add(new ToggleButton(toggleValue.toString()));
  }

  // Default set to first choice
  setValue(toggleValues.get(0));

  setLeft(segmentedButton);
}
 
开发者ID:mzmine,项目名称:mzmine3,代码行数:22,代码来源:ToggleEditor.java

示例12: MZToleranceEditor

import org.controlsfx.control.PropertySheet; //导入依赖的package包/类
public MZToleranceEditor(PropertySheet.Item parameter) {
  if (!(parameter instanceof MZToleranceParameter))
    throw new IllegalArgumentException();

  // The m/z value field
  fieldMZ = new TextField();

  // The m/z label
  Label mzLabel = new Label("m/z");

  // The 'or' label
  Label orLabel = new Label(" or ");

  // The ppm value field
  fieldPPM = new TextField();

  // The m/z label
  Label ppmLabel = new Label("ppm");

  // FlowPane setting
  setHgap(7);

  // Add the elements
  getChildren().addAll(fieldMZ, mzLabel, orLabel, fieldPPM, ppmLabel);
}
 
开发者ID:mzmine,项目名称:mzmine3,代码行数:26,代码来源:MZToleranceEditor.java

示例13: RTToleranceEditor

import org.controlsfx.control.PropertySheet; //导入依赖的package包/类
public RTToleranceEditor(PropertySheet.Item parameter) {
  if (!(parameter instanceof RTToleranceParameter))
    throw new IllegalArgumentException();

  // The value field
  valueField = new TextField();

  // The combo box
  ObservableList<String> options =
      FXCollections.observableArrayList("Absolute (sec)", "Relative (%)");
  comboBox = new ComboBox<String>(options);

  // FlowPane setting
  setHgap(10);

  // Add the elements
  getChildren().addAll(valueField, comboBox);
}
 
开发者ID:mzmine,项目名称:mzmine3,代码行数:19,代码来源:RTToleranceEditor.java

示例14: NumOfThreadsEditor

import org.controlsfx.control.PropertySheet; //导入依赖的package包/类
public NumOfThreadsEditor(PropertySheet.Item parameter) {

    // HBox properties
    setSpacing(10);
    setAlignment(Pos.CENTER_LEFT);

    numField = new SpinnerAutoCommit<>(1, 999999, 4);
    numField.setPrefWidth(80.0);
    numField.setEditable(true);

    optionCombo = new ComboBox<>(options);
    optionCombo.setOnAction(e -> {
      numField.setVisible(optionCombo.getSelectionModel().getSelectedIndex() == 1);
    });

    getChildren().addAll(optionCombo, numField);

  }
 
开发者ID:mzmine,项目名称:mzmine3,代码行数:19,代码来源:NumOfThreadsEditor.java

示例15: DataManipulationUI

import org.controlsfx.control.PropertySheet; //导入依赖的package包/类
public DataManipulationUI(){
    StyleManager.getInstance().addUserAgentStylesheet(PropertySheet.class.getResource("propertysheet.css").toExternalForm());

    // Initializing the main grid
    grid = new GridPane();
    grid.setPadding(new Insets(5,5,5,5));
    
    // Adding separators
    grid.add(new Text("Available datasets"),0,0);
    grid.add(new Separator(),0,1);
    grid.add(new Text("Import a dataset"),0,3);
    grid.add(new Separator(),0,4);
    grid.add(new Text("Preprocess the selected dataset"),0,6);
    grid.add(new Separator(),0,7);
    grid.add(new Text("Filter the selected preprocessed dataset"),0,9);
    grid.add(new Separator(),0,10);
    
    // Initializing specific UIs
    availableDatasetsUI();
    newDatasetProperties = new HashMap<>();
    importUI();
    preprocessUI();
    filterUI();
}
 
开发者ID:AdrienGuille,项目名称:SONDY,代码行数:25,代码来源:DataManipulationUI.java


注:本文中的org.controlsfx.control.PropertySheet类示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。