Search in sources :

Example 1 with AssetPanel

use of de.gurkenlabs.utiliti.swing.AssetPanel in project litiengine by gurkenlabs.

the class Program method initAssetsComponent.

private static Component initAssetsComponent() {
    JSplitPane split = new JSplitPane(JSplitPane.HORIZONTAL_SPLIT);
    assetTree = new AssetTree();
    split.setLeftComponent(assetTree);
    assetPanel = new AssetPanel();
    JScrollPane scrollPane = new JScrollPane(assetPanel);
    split.addPropertyChangeListener(JSplitPane.DIVIDER_LOCATION_PROPERTY, evt -> userPreferences.setAssetsSplitter(split.getDividerLocation()));
    split.setDividerLocation(userPreferences.getMainSplitterPosition() != 0 ? userPreferences.getAssetsSplitter() : 200);
    split.setRightComponent(scrollPane);
    return split;
}
Also used : JScrollPane(javax.swing.JScrollPane) AssetPanel(de.gurkenlabs.utiliti.swing.AssetPanel) AssetTree(de.gurkenlabs.utiliti.swing.AssetTree) JSplitPane(javax.swing.JSplitPane)

Aggregations

AssetPanel (de.gurkenlabs.utiliti.swing.AssetPanel)1 AssetTree (de.gurkenlabs.utiliti.swing.AssetTree)1 JScrollPane (javax.swing.JScrollPane)1 JSplitPane (javax.swing.JSplitPane)1