public void resize() {
        if (getPrefWidth() > 0 && getPrefHeight() > 0) {
            if (resizeable) {
                size = getPrefWidth() < getPrefHeight() ? getPrefWidth() : getPrefHeight();
                setPrefSize(size * getSymbolType().WIDTH_FACTOR, size * getSymbolType().HEIGHT_FACTOR);
            } else {
                setMinSize(size * getSymbolType().WIDTH_FACTOR, size * getSymbolType().HEIGHT_FACTOR);
                setPrefSize(size * getSymbolType().WIDTH_FACTOR, size * getSymbolType().HEIGHT_FACTOR);
                setMaxSize(size * getSymbolType().WIDTH_FACTOR, size * getSymbolType().HEIGHT_FACTOR);
            }
        }
    }