Search in sources :

Example 1 with Shape

use of com.ldtteam.structurize.api.util.Shape in project Structurize by ldtteam.

the class WindowShapeTool method disableInputIfNecessary.

private void disableInputIfNecessary() {
    final Shape shape = Settings.instance.getShape();
    final View height = findPaneOfTypeByID(HEIGHT_VIEW, View.class);
    final View width = findPaneOfTypeByID(WIDTH_VIEW, View.class);
    final View length = findPaneOfTypeByID(LENGTH_VIEW, View.class);
    final View frequency = findPaneOfTypeByID(FREQUENCY_VIEW, View.class);
    final View equation = findPaneOfTypeByID(SHAPE_VIEW, View.class);
    height.show();
    width.show();
    length.show();
    frequency.show();
    equation.hide();
    findPaneByID(BUTTON_HOLLOW).show();
    findPaneByID(BUTTON_PICK_FILL_BLOCK).show();
    findPaneByID(RESOURCE_ICON_FILL).show();
    if (shape == Shape.RANDOM) {
        equation.show();
        frequency.hide();
        findPaneByID(BUTTON_HOLLOW).hide();
        findPaneByID(BUTTON_PICK_FILL_BLOCK).hide();
        findPaneByID(RESOURCE_ICON_FILL).hide();
    } else if (shape == Shape.SPHERE || shape == Shape.HALF_SPHERE || shape == Shape.BOWL || shape == Shape.PYRAMID || shape == Shape.UPSIDE_DOWN_PYRAMID || shape == Shape.DIAMOND) {
        width.hide();
        length.hide();
        frequency.hide();
    } else if (shape == Shape.CYLINDER || shape == Shape.CONE) {
        length.hide();
        frequency.hide();
    } else if (shape != Shape.WAVE && shape != Shape.WAVE_3D) {
        frequency.hide();
    }
}
Also used : Shape(com.ldtteam.structurize.api.util.Shape) View(com.ldtteam.blockout.views.View)

Aggregations

View (com.ldtteam.blockout.views.View)1 Shape (com.ldtteam.structurize.api.util.Shape)1