Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fields migrate state private2protected #452

Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -26,8 +26,8 @@ public class DoubleSliderControl extends SimpleControl<DoubleField, HBox> {
* - slider is the control to change the value.
* - node holds the control so that it can be styled properly.
*/
private Slider slider;
private Label valueLabel;
protected Slider slider;
protected Label valueLabel;
private double min;
private double max;
private int precision;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,9 +23,9 @@ public class IntegerSliderControl extends SimpleControl<IntegerField, HBox> {
* - slider is the control to change the value.
* - container holds the control so that it can be styled properly.
*/
private Label fieldLabel;
private Slider slider;
private Label valueLabel;
protected Label fieldLabel;
protected Slider slider;
protected Label valueLabel;
private int min;
private int max;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ public class SimpleCheckBoxControl<V> extends SimpleControl<MultiSelectionField<
* - The checkboxes list contains all the checkboxes to display.
* - The node is a VBox holding all node.
*/
private final List<CheckBox> checkboxes = new ArrayList<>();
protected final List<CheckBox> checkboxes = new ArrayList<>();

/**
* Constructs a SimpleCheckBoxControl of {@link SimpleCheckBoxControl} type, with visibility condition.
Expand Down Expand Up @@ -137,7 +137,7 @@ public void setupEventHandlers() {
* This method creates node and adds them to checkboxes and is
* used when the itemsProperty on the field changes.
*/
private void createCheckboxes() {
protected void createCheckboxes() {
node.getChildren().clear();
checkboxes.clear();

Expand All @@ -156,7 +156,7 @@ private void createCheckboxes() {
/**
* Sets up bindings for all checkboxes.
*/
private void setupCheckboxBindings() {
protected void setupCheckboxBindings() {
for (CheckBox checkbox : checkboxes) {
checkbox.disableProperty().bind(field.editableProperty().not());
}
Expand All @@ -165,7 +165,7 @@ private void setupCheckboxBindings() {
/**
* Sets up event handlers for all checkboxes.
*/
private void setupCheckboxEventHandlers() {
protected void setupCheckboxEventHandlers() {
for (int i = 0; i < checkboxes.size(); i++) {
final int j = i;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -55,10 +55,10 @@ public class SimpleChooserControl extends SimpleControl<StringField, StackPane>
* editableField allows users to modify the field's value. - The readOnlyLabel displays the
* field's value if it is not editable.
*/
private TextField editableField;
private TextArea editableArea;
private Label readOnlyLabel;
private Label fieldLabel;
protected TextField editableField;
protected TextArea editableArea;
protected Label readOnlyLabel;
protected Label fieldLabel;
private Button chooserButton = new Button();
private HBox contentBox = new HBox();
private String buttonText;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ public class SimpleColorPickerControl extends SimpleControl<StringField, StackPa
/**
* - The colorPicker is the container that displays the node to select a color value.
*/
private ColorPicker colorPicker;
protected ColorPicker colorPicker;
private Color initialValue;
private Label fieldLabel;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -47,9 +47,9 @@ public class SimpleComboBoxControl<V> extends SimpleControl<SingleSelectionField
* - The readOnlyLabel is used to show the current selection in read only.
* - The node is a StackPane to hold the field and read only label.
*/
private Label fieldLabel;
private ComboBox<V> comboBox;
private Label readOnlyLabel;
protected Label fieldLabel;
protected ComboBox<V> comboBox;
protected Label readOnlyLabel;

/**
* Constructs a SimpleComboBoxControl of {@link SimpleComboBoxControl} type, with visibility condition.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -44,12 +44,12 @@ public class SimpleListViewControl<V>
* the field.
* - The node is the container that displays list values.
*/
private Label fieldLabel;
protected Label fieldLabel;

/**
* The flag used for setting the selection properly.
*/
private boolean preventUpdate;
protected boolean preventUpdate;

/**
* Constructs a SimpleListViewControl of {@link SimpleListViewControl} type, with visibility condition.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -44,9 +44,9 @@ public abstract class SimpleNumberControl<F extends DataField, D extends Number>
* - The editableSpinner is a Spinner for setting numerical values.
* - The readOnlyLabel is the label to put over editableSpinner.
*/
private Label fieldLabel;
protected Label fieldLabel;
protected Spinner<D> editableSpinner;
private Label readOnlyLabel;
protected Label readOnlyLabel;

/**
* {@inheritDoc}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -46,10 +46,10 @@ public class SimpleRadioButtonControl<V> extends SimpleControl<SingleSelectionFi
* - The toggleGroup defines the group for the radio buttons.
* - The node is a VBox holding all radio buttons.
*/
private final List<RadioButton> radioButtons = new ArrayList<>();
private ToggleGroup toggleGroup;
protected final List<RadioButton> radioButtons = new ArrayList<>();
protected ToggleGroup toggleGroup;

private Label fieldLabel;
protected Label fieldLabel;

/**
* Constructs a SimpleRadioButtonControl of {@link SimpleRadioButtonControl} type, with visibility condition.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -46,10 +46,10 @@ public class SimpleTextControl extends SimpleControl<StringField, StackPane> {
* - The editableField allows users to modify the field's value.
* - The readOnlyLabel displays the field's value if it is not editable.
*/
private TextField editableField;
private TextArea editableArea;
private Label readOnlyLabel;
private Label fieldLabel;
protected TextField editableField;
protected TextArea editableArea;
protected Label readOnlyLabel;
protected Label fieldLabel;

/**
* Constructs a SimpleTextControl of {@link SimpleTextControl} type, with visibility condition.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,8 +23,8 @@ public class PreferencesFxFormRenderer extends GridPane implements ViewMixin {
*/
public static final double SPACING = 5;

private final Form form;
private List<PreferencesFxGroupRenderer> groups = new ArrayList<>();
protected final Form form;
protected List<PreferencesFxGroupRenderer> groups = new ArrayList<>();

/**
* This is the constructor to pass over data.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ public class PreferencesFxGroup extends Group {
/**
* {@inheritDoc}
*/
private PreferencesFxGroup(Element... elements) {
protected PreferencesFxGroup(Element... elements) {
super(elements);

// Whenever the title's key changes, update the displayed value based
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ public class PreferencesFxGroupRenderer {
*
* @param preferencesGroup The PreferencesGroup which gets rendered.
*/
PreferencesFxGroupRenderer(PreferencesFxGroup preferencesGroup, GridPane grid) {
protected PreferencesFxGroupRenderer(PreferencesFxGroup preferencesGroup, GridPane grid) {
this.preferencesGroup = preferencesGroup;
this.grid = grid;
preferencesGroup.setRenderer(this);
Expand Down