Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
P
ProofScriptParser
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
24
Issues
24
List
Boards
Labels
Service Desk
Milestones
Merge Requests
4
Merge Requests
4
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Operations
Operations
Incidents
Environments
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
sarah.grebing
ProofScriptParser
Commits
55375f3a
Commit
55375f3a
authored
Jun 08, 2017
by
Sarah Grebing
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Empty tab pane has buttons now, need to add the appropriate Action
parent
2ce23e4b
Pipeline
#11045
failed with stage
in 3 minutes and 3 seconds
Changes
2
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
30 additions
and
17 deletions
+30
-17
src/main/java/edu/kit/formal/gui/controls/CustomTabPaneSkin.java
...n/java/edu/kit/formal/gui/controls/CustomTabPaneSkin.java
+4
-10
src/main/java/edu/kit/formal/gui/controls/PlaceHolderTab.java
...main/java/edu/kit/formal/gui/controls/PlaceHolderTab.java
+26
-7
No files found.
src/main/java/edu/kit/formal/gui/controls/CustomTabPaneSkin.java
View file @
55375f3a
package
edu.kit.formal.gui.controls
;
package
edu.kit.formal.gui.controls
;
import
com.sun.javafx.scene.control.skin.TabPaneSkin
;
import
com.sun.javafx.scene.control.skin.TabPaneSkin
;
import
javafx.geometry.Pos
;
import
javafx.scene.Node
;
import
javafx.scene.Node
;
import
javafx.scene.control.TabPane
;
import
javafx.scene.control.TabPane
;
import
javafx.scene.layout.Pane
;
import
javafx.scene.layout.Pane
;
...
@@ -19,16 +20,9 @@ public class CustomTabPaneSkin extends TabPaneSkin {
...
@@ -19,16 +20,9 @@ public class CustomTabPaneSkin extends TabPaneSkin {
public
CustomTabPaneSkin
(
TabPane
tabPane
)
{
public
CustomTabPaneSkin
(
TabPane
tabPane
)
{
super
(
tabPane
);
super
(
tabPane
);
placeHolder
=
new
PlaceHolderTab
();
placeHolder
=
new
PlaceHolderTab
();
//placeHolderText = new Label( "Empty" );
placeHolder
.
getVbox
().
minWidthProperty
().
bind
(
getSkinnable
().
widthProperty
());
//placeHolderText.setFont( Font.font( null, FontWeight.BOLD, 20 ) );
placeHolder
.
getVbox
().
minHeightProperty
().
bind
(
getSkinnable
().
heightProperty
());
//placeHolderText.setAlignment( Pos.CENTER );
placeHolder
.
getVbox
().
setAlignment
(
Pos
.
CENTER
);
//placeHolderText.minWidthProperty().bind( getSkinnable().widthProperty() );
//placeHolderText.minHeightProperty().bind( getSkinnable().heightProperty() );
//placeHolder = new VBox( placeHolderText );
placeHolder
.
minWidthProperty
().
bind
(
getSkinnable
().
widthProperty
());
placeHolder
.
minHeightProperty
().
bind
(
getSkinnable
().
heightProperty
());
for
(
Node
node
:
getChildren
())
{
for
(
Node
node
:
getChildren
())
{
if
(
node
.
getStyleClass
().
contains
(
"tab-header-area"
))
{
if
(
node
.
getStyleClass
().
contains
(
"tab-header-area"
))
{
...
...
src/main/java/edu/kit/formal/gui/controls/PlaceHolderTab.java
View file @
55375f3a
package
edu.kit.formal.gui.controls
;
package
edu.kit.formal.gui.controls
;
import
javafx.geometry.
Inset
s
;
import
javafx.geometry.
Po
s
;
import
javafx.scene.control.Button
;
import
javafx.scene.control.Button
;
import
javafx.scene.layout.FlowPane
;
import
javafx.scene.layout.VBox
;
import
javafx.scene.layout.VBox
;
/**
/**
* Replacement for empty Tab with two buttons
* Replacement for empty Tab with two buttons
*/
*/
public
class
PlaceHolderTab
extends
VBox
{
public
class
PlaceHolderTab
extends
FlowPane
{
/**
* Button to open a new script
*/
private
final
Button
newScript
=
new
Button
(
"New Script"
);
private
final
Button
newScript
=
new
Button
(
"New Script"
);
/**
* Button to open a script
*/
private
final
Button
openScript
=
new
Button
(
"Open Script"
);
private
final
Button
openScript
=
new
Button
(
"Open Script"
);
private
VBox
vbox
;
/**
* Pane holding the buttons for an empty tab
*/
public
PlaceHolderTab
()
{
public
PlaceHolderTab
()
{
this
.
setPadding
(
new
Insets
(
10
,
50
,
50
,
50
));
vbox
=
new
VBox
();
this
.
setSpacing
(
10
);
newScript
.
setMaxSize
(
Double
.
MAX_VALUE
,
Double
.
MAX_VALUE
);
openScript
.
setMaxSize
(
Double
.
MAX_VALUE
,
Double
.
MAX_VALUE
);
newScript
.
setAlignment
(
Pos
.
CENTER
);
openScript
.
setAlignment
(
Pos
.
CENTER
);
vbox
.
getChildren
().
add
(
newScript
);
vbox
.
getChildren
().
add
(
openScript
);
vbox
.
setAlignment
(
Pos
.
CENTER
);
this
.
getChildren
().
add
(
vbox
);
}
this
.
getChildren
().
add
(
newScript
);
public
VBox
getVbox
()
{
this
.
getChildren
().
add
(
openScript
)
;
return
vbox
;
}
}
public
Button
getNewScript
()
{
public
Button
getNewScript
()
{
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment