forked from phoedos/pmd
Convert XPath titledPanes to ToolBarTitledPanes
This commit is contained in:
parent
fab97b7c37
commit
9e27bf2e6b
@ -95,7 +95,7 @@ public class XPathPanelController extends AbstractController {
|
||||
@FXML
|
||||
private SyntaxHighlightingCodeArea xpathExpressionArea;
|
||||
@FXML
|
||||
private TitledPane violationsTitledPane;
|
||||
private ToolbarTitledPane violationsTitledPane;
|
||||
@FXML
|
||||
private ListView<TextAwareNodeWrapper> xpathResultListView;
|
||||
|
||||
@ -255,7 +255,7 @@ public class XPathPanelController extends AbstractController {
|
||||
ruleBuilder.getRuleProperties()));
|
||||
xpathResultListView.setItems(results.stream().map(parent::wrapNode).collect(Collectors.toCollection(LiveArrayList::new)));
|
||||
parent.highlightXPathResults(results);
|
||||
violationsTitledPane.setText("Matched nodes\t(" + results.size() + ")");
|
||||
violationsTitledPane.setTitle("Matched nodes (" + results.size() + ")");
|
||||
// Notify that everything went OK so we can avoid logging very recent exceptions
|
||||
designerRoot.getLogger().logEvent(new LogEntry(null, Category.XPATH_OK));
|
||||
} catch (XPathEvaluationException e) {
|
||||
@ -274,7 +274,7 @@ public class XPathPanelController extends AbstractController {
|
||||
public void invalidateResults(boolean error) {
|
||||
xpathResultListView.getItems().clear();
|
||||
parent.resetXPathResults();
|
||||
violationsTitledPane.setText("Matched nodes" + (error ? "\t(error)" : ""));
|
||||
violationsTitledPane.setTitle("Matched nodes" + (error ? "\t(error)" : ""));
|
||||
}
|
||||
|
||||
|
||||
|
@ -10,7 +10,6 @@
|
||||
<?import javafx.scene.control.ListView?>
|
||||
<?import javafx.scene.control.MenuButton?>
|
||||
<?import javafx.scene.control.SplitPane?>
|
||||
<?import javafx.scene.control.TitledPane?>
|
||||
<?import javafx.scene.control.Tooltip?>
|
||||
<?import javafx.scene.layout.AnchorPane?>
|
||||
<?import javafx.scene.shape.SVGPath?>
|
||||
@ -24,6 +23,7 @@
|
||||
fx:controller="net.sourceforge.pmd.util.fxdesigner.XPathPanelController">
|
||||
<children>
|
||||
<SplitPane dividerPositions="0.2, 0.8"
|
||||
styleClass="accent-header"
|
||||
AnchorPane.bottomAnchor="0.0"
|
||||
AnchorPane.leftAnchor="0.0"
|
||||
AnchorPane.rightAnchor="0.0"
|
||||
@ -31,10 +31,10 @@
|
||||
<items>
|
||||
<AnchorPane>
|
||||
<children>
|
||||
<TitledPane animated="false"
|
||||
<ToolbarTitledPane animated="false"
|
||||
collapsible="false"
|
||||
styleClass="accent-header"
|
||||
text="Properties"
|
||||
title="Properties"
|
||||
AnchorPane.bottomAnchor="0.0"
|
||||
AnchorPane.leftAnchor="0.0"
|
||||
AnchorPane.rightAnchor="0.0"
|
||||
@ -51,7 +51,7 @@
|
||||
</padding>
|
||||
</AnchorPane>
|
||||
</content>
|
||||
</TitledPane>
|
||||
</ToolbarTitledPane>
|
||||
</children>
|
||||
</AnchorPane>
|
||||
<AnchorPane>
|
||||
@ -109,11 +109,11 @@
|
||||
</AnchorPane>
|
||||
<AnchorPane>
|
||||
<children>
|
||||
<TitledPane fx:id="violationsTitledPane"
|
||||
<ToolbarTitledPane fx:id="violationsTitledPane"
|
||||
animated="false"
|
||||
collapsible="false"
|
||||
styleClass="accent-header"
|
||||
text="Matched Nodes"
|
||||
title="Matched Nodes"
|
||||
AnchorPane.bottomAnchor="0.0"
|
||||
AnchorPane.leftAnchor="0.0"
|
||||
AnchorPane.rightAnchor="0.0"
|
||||
@ -121,14 +121,10 @@
|
||||
<content>
|
||||
<ListView stylesheets="@../css/syntax-highlighting.css" fx:id="xpathResultListView" />
|
||||
</content>
|
||||
</TitledPane>
|
||||
</ToolbarTitledPane>
|
||||
</children>
|
||||
</AnchorPane>
|
||||
</items>
|
||||
<styleClass>
|
||||
<String fx:value="bottom-pane-split-pane" />
|
||||
<String fx:value="accent-header" />
|
||||
</styleClass>
|
||||
</SplitPane>
|
||||
</children>
|
||||
</AnchorPane>
|
||||
|
Loading…
x
Reference in New Issue
Block a user