Skip to content

Commit

Permalink
feat(frame): 接口重命名 (#780)
Browse files Browse the repository at this point in the history
Signed-off-by: unknowIfGuestInDream <liang.tang.cx@gmail.com>
  • Loading branch information
unknowIfGuestInDream committed Sep 27, 2023
1 parent f439109 commit b993080
Show file tree
Hide file tree
Showing 5 changed files with 7 additions and 7 deletions.
2 changes: 1 addition & 1 deletion frame/src/main/java/com/tlcsdm/frame/Sample.java
Original file line number Diff line number Diff line change
Expand Up @@ -118,6 +118,6 @@ public sealed interface Sample permits EmptySample, SampleBase {
/**
* 是否有右侧区域
*/
boolean hasRightPanel();
boolean hasControlPanel();

}
6 changes: 3 additions & 3 deletions frame/src/main/java/com/tlcsdm/frame/SampleBase.java
Original file line number Diff line number Diff line change
Expand Up @@ -348,7 +348,7 @@ public static Node buildSample(Sample sample, Stage stage) {
addRightPanel = true;
}

if (addRightPanel && sample.hasRightPanel()) {
if (addRightPanel && sample.hasControlPanel()) {
ScrollPane scrollPane = new ScrollPane(rightPanel);
scrollPane.setMaxHeight(Double.MAX_VALUE);
scrollPane.setFitToWidth(true);
Expand All @@ -357,7 +357,7 @@ public static Node buildSample(Sample sample, Stage stage) {
SplitPane.setResizableWithParent(scrollPane, false);
splitPane.getItems().add(scrollPane);
}
if (splitPane.getDividers().size() > 0) {
if (!splitPane.getDividers().isEmpty()) {
splitPane.getDividers().get(0).positionProperty().addListener((observable, oldValue, newValue) -> {
Config.set(Keys.ControlDividerPosition, String.format("%.2f", newValue));
});
Expand All @@ -366,7 +366,7 @@ public static Node buildSample(Sample sample, Stage stage) {
}

@Override
public boolean hasRightPanel() {
public boolean hasControlPanel() {
return true;
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -109,7 +109,7 @@ public void initialize() {
}

@Override
public boolean hasRightPanel() {
public boolean hasControlPanel() {
return false;
}

Expand Down
2 changes: 1 addition & 1 deletion qe/src/main/java/com/tlcsdm/qe/tools/DaliDemo.java
Original file line number Diff line number Diff line change
Expand Up @@ -91,7 +91,7 @@ public String getSampleVersion() {
}

@Override
public boolean hasRightPanel() {
public boolean hasControlPanel() {
return false;
}

Expand Down
2 changes: 1 addition & 1 deletion qe/src/main/java/com/tlcsdm/qe/tools/FxmlDemo.java
Original file line number Diff line number Diff line change
Expand Up @@ -183,7 +183,7 @@ public String getSampleVersion() {
}

@Override
public boolean hasRightPanel() {
public boolean hasControlPanel() {
return false;
}

Expand Down

0 comments on commit b993080

Please sign in to comment.