Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
refs #441
- Loading branch information
Showing
7 changed files
with
153 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
<?xml version="1.0" encoding="UTF-8"?> | ||
<classpath> | ||
<classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-1.8"/> | ||
<classpathentry kind="con" path="org.eclipse.pde.core.requiredPlugins"/> | ||
<classpathentry kind="src" path="src"/> | ||
<classpathentry kind="output" path="bin"/> | ||
</classpath> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
/bin/ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
<?xml version="1.0" encoding="UTF-8"?> | ||
<projectDescription> | ||
<name>org.eclipse.fx.ui.panes.demo</name> | ||
<comment></comment> | ||
<projects> | ||
</projects> | ||
<buildSpec> | ||
<buildCommand> | ||
<name>org.eclipse.jdt.core.javabuilder</name> | ||
<arguments> | ||
</arguments> | ||
</buildCommand> | ||
<buildCommand> | ||
<name>org.eclipse.pde.ManifestBuilder</name> | ||
<arguments> | ||
</arguments> | ||
</buildCommand> | ||
<buildCommand> | ||
<name>org.eclipse.pde.SchemaBuilder</name> | ||
<arguments> | ||
</arguments> | ||
</buildCommand> | ||
</buildSpec> | ||
<natures> | ||
<nature>org.eclipse.pde.PluginNature</nature> | ||
<nature>org.eclipse.jdt.core.javanature</nature> | ||
</natures> | ||
</projectDescription> |
8 changes: 8 additions & 0 deletions
8
demos/org.eclipse.fx.ui.panes.demo/.settings/org.eclipse.jdt.core.prefs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
eclipse.preferences.version=1 | ||
org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled | ||
org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.8 | ||
org.eclipse.jdt.core.compiler.compliance=1.8 | ||
org.eclipse.jdt.core.compiler.problem.assertIdentifier=error | ||
org.eclipse.jdt.core.compiler.problem.enumIdentifier=error | ||
org.eclipse.jdt.core.compiler.release=disabled | ||
org.eclipse.jdt.core.compiler.source=1.8 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
Manifest-Version: 1.0 | ||
Bundle-ManifestVersion: 2 | ||
Bundle-Name: Demo | ||
Bundle-SymbolicName: org.eclipse.fx.ui.panes.demo | ||
Bundle-Version: 1.0.0.qualifier | ||
Automatic-Module-Name: org.eclipse.fx.ui.panes.demo | ||
Bundle-RequiredExecutionEnvironment: JavaSE-1.8 | ||
Require-Bundle: org.eclipse.fx.ui.panes;bundle-version="3.7.1" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
source.. = src/ | ||
output.. = bin/ | ||
bin.includes = META-INF/,\ | ||
. |
97 changes: 97 additions & 0 deletions
97
demos/org.eclipse.fx.ui.panes.demo/src/org/eclipse/fx/ui/panes/demo/SashPaneDemo.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,97 @@ | ||
package org.eclipse.fx.ui.panes.demo; | ||
|
||
import org.eclipse.fx.ui.panes.SashPane; | ||
import org.eclipse.fx.ui.panes.SashPane.FixedSashItem; | ||
|
||
import javafx.application.Application; | ||
import javafx.beans.value.ObservableBooleanValue; | ||
import javafx.geometry.Insets; | ||
import javafx.scene.Node; | ||
import javafx.scene.Scene; | ||
import javafx.scene.control.Label; | ||
import javafx.scene.control.Tab; | ||
import javafx.scene.control.TabPane; | ||
import javafx.scene.control.TitledPane; | ||
import javafx.scene.layout.Priority; | ||
import javafx.scene.layout.StackPane; | ||
import javafx.scene.layout.VBox; | ||
import javafx.stage.Stage; | ||
|
||
public class SashPaneDemo extends Application { | ||
|
||
public static void main(String[] args) { | ||
launch(args); | ||
} | ||
|
||
@Override | ||
public void start(Stage primaryStage) throws Exception { | ||
TabPane root = new TabPane(); | ||
root.getTabs().add(createSimpleStartVertical()); | ||
root.getTabs().add(createSimpleEndVertical()); | ||
|
||
Scene s = new Scene(root, 800, 600); | ||
primaryStage.setScene(s); | ||
primaryStage.show(); | ||
} | ||
|
||
private Tab createSimpleStartVertical() { | ||
SashPane pane = new SashPane(); | ||
VBox.setVgrow(pane, Priority.ALWAYS); | ||
pane.setHorizontal(false); | ||
|
||
pane.getItems().add(new StackPane(new Label("Content"))); | ||
pane.getItems().add(createGroupNode()); | ||
|
||
StackPane root = new StackPane(pane); | ||
|
||
return new Tab("Simple - Start - Vertical", root); | ||
} | ||
|
||
private Tab createSimpleEndVertical() { | ||
SashPane pane = new SashPane(); | ||
VBox.setVgrow(pane, Priority.ALWAYS); | ||
pane.setHorizontal(false); | ||
|
||
pane.getItems().add(createGroupNode()); | ||
pane.getItems().add(new StackPane(new Label("Content"))); | ||
|
||
StackPane root = new StackPane(pane); | ||
|
||
return new Tab("Simple - End - Vertical", root); | ||
} | ||
|
||
private Tab createComplex3() { | ||
SashPane pane = new SashPane(); | ||
VBox.setVgrow(pane, Priority.ALWAYS); | ||
pane.setHorizontal(false); | ||
pane.getItems().add(new StackPane(new Label("Top"))); | ||
TitledPane titlePane = createGroupNode(); | ||
pane.getItems().add(titlePane); | ||
pane.getItems().add(new StackPane(new Label("Bottom"))); | ||
|
||
StackPane root = new StackPane(pane); | ||
|
||
return new Tab("Simple - Start - Vertical", root); | ||
} | ||
|
||
private TitledPane createGroupNode() { | ||
VBox content = new VBox(new Label("Content")); | ||
content.setPadding(new Insets(30)); | ||
// content.setPrefHeight(1000); | ||
// content.setMaxHeight(1000); | ||
TitledPane pane = new SashTitlePane("Sample", content); | ||
return pane; | ||
} | ||
|
||
class SashTitlePane extends TitledPane implements FixedSashItem { | ||
public SashTitlePane(String title, Node content) { | ||
super(title, content); | ||
} | ||
|
||
@Override | ||
public ObservableBooleanValue fixed() { | ||
return expandedProperty().not(); | ||
} | ||
|
||
} | ||
} |