public static Object getSubPropertyValue()

in kit/src/main/java/com/oracle/javafx/scenebuilder/kit/editor/panel/css/CssValueConverter.java [125:177]


    public static Object getSubPropertyValue(String property, Object value) {
        if (value instanceof Collection) {
            Collection<?> values = (Collection<?>) value;
            List<Object> subValues = new ArrayList<>();
            for (Object bf : values) {
                subValues.add(getSubPropertyValue(property, bf));
            }
            return subValues;
        } else if (value != null && value.getClass().isArray()) {
            Object newArray = Array.newInstance(value.getClass().getComponentType(), Array.getLength(value));
            for (int i = 0; i < Array.getLength(value); i++) {
                Array.set(newArray, i, getSubPropertyValue(property, Array.get(value, i)));
            }
            return newArray;

            //
            // Background
            //
        } else if (value instanceof Background) {
            Background background = (Background) value;
            if (background.getFills() != null) {
                return getSubPropertyValue(property, background.getFills());
            } else if (background.getImages() != null) {
                return getSubPropertyValue(property, background.getImages());
            }
        } else if (value instanceof BackgroundFill) {
            return subBackgroundFill(property, (BackgroundFill) value);
        } else if (value instanceof BackgroundImage) {
            return subBackgroundImage(property, (BackgroundImage) value);

            //
            // Border
            //
        } else if (value instanceof Border) {
            Border border = (Border) value;
            if (border.getStrokes() != null) {
                return getSubPropertyValue(property, border.getStrokes());
            } else if (border.getImages() != null) {
                return getSubPropertyValue(property, border.getImages());
            }
        } else if (value instanceof BorderStroke) {
            return subBorderStroke(property, (BorderStroke) value);
        } else if (value instanceof BorderImage) {
            return subBorderImage(property, (BorderImage) value);

            //
            // Font
            //
        } else if (value instanceof Font) {
            return subFont(property, (Font) value);
        }
        return getValue(property, null, value);
    }