本文整理汇总了Java中javafx.scene.control.SplitMenuButton类的典型用法代码示例。如果您正苦于以下问题:Java SplitMenuButton类的具体用法?Java SplitMenuButton怎么用?Java SplitMenuButton使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
SplitMenuButton类属于javafx.scene.control包,在下文中一共展示了SplitMenuButton类的13个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的Java代码示例。
示例1: getConstructorPage
import javafx.scene.control.SplitMenuButton; //导入依赖的package包/类
@Override
protected List<Labeled> getConstructorPage() {
List<Labeled> list = new ArrayList<Labeled>();
SplitMenuButton defaultButton = new SplitMenuButton();
defaultLayout.apply(defaultButton);
if (!defaultButton.getText().equals("")) {
reportGetterFailure("new SplitMenuButton()");
} else {
list.add(defaultButton);
}
SplitMenuButton itemsButton = new SplitMenuButton(new MenuItem("Item 1"), new MenuItem("Item 2"), new MenuItem("Item 3"));
defaultLayout.apply(itemsButton);
if (!itemsButton.getItems().get(0).getText().equals("Item 1")
|| !itemsButton.getItems().get(1).getText().equals("Item 2")
|| !itemsButton.getItems().get(2).getText().equals("Item 3")
|| !itemsButton.getText().equals("")
|| itemsButton.getGraphic() != null) {
reportGetterFailure("new SplitMenuButton(MenuItem...)");
} else {
list.add(itemsButton);
}
return list;
}
开发者ID:teamfx,项目名称:openjfx-8u-dev-tests,代码行数:27,代码来源:SplitMenuButtonsApp.java
示例2: getScene
import javafx.scene.control.SplitMenuButton; //导入依赖的package包/类
@Override
protected Scene getScene() {
return new LabeledsApp.LabeledScene() {
@Override
protected Labeled getTestedLabeled() {
return new SplitMenuButton();
}
};
}
开发者ID:teamfx,项目名称:openjfx-8u-dev-tests,代码行数:11,代码来源:SplitMenuButtonApp.java
示例3: getListenable
import javafx.scene.control.SplitMenuButton; //导入依赖的package包/类
@Override
protected Labeled getListenable() {
SplitMenuButton button = new FireListenableButton();
button.setText(DEFAULT);
defaultLayout.apply(button);
return button;
}
开发者ID:teamfx,项目名称:openjfx-8u-dev-tests,代码行数:8,代码来源:SplitMenuButtonsApp.java
示例4: getButton
import javafx.scene.control.SplitMenuButton; //导入依赖的package包/类
@Override
protected Labeled getButton() {
SplitMenuButton button = new SplitMenuButton();
button.setText(DEFAULT);
defaultLayout.apply(button);
return button;
}
开发者ID:teamfx,项目名称:openjfx-8u-dev-tests,代码行数:8,代码来源:SplitMenuButtonsApp.java
示例5: testGetMenuSplitButtonAdjuster
import javafx.scene.control.SplitMenuButton; //导入依赖的package包/类
@Test
public void testGetMenuSplitButtonAdjuster() {
Adjuster adjuster = Adjuster.getAdjuster(SplitMenuButton.class);
assertThat(adjuster, is(instanceOf(ControlAdjuster.class)));
assertThat(adjuster.getNodeClass(), is(sameInstance(Control.class)));
}
开发者ID:yumix,项目名称:javafx-dpi-scaling,代码行数:8,代码来源:AdjusterTest.java
示例6: tip
import javafx.scene.control.SplitMenuButton; //导入依赖的package包/类
public void tip(ActionEvent actionEvent) {
// String tip = coinBaseAuth.loadToken("tip");
final String s;
Object source = actionEvent.getSource();
if (source instanceof SplitMenuButton) {
s = ((SplitMenuButton)source).getText();
} else if (source instanceof MenuItem) {
s = ((MenuItem)source).getText();
} else {
hideTipBar();
return;
}
String url = tipMap.get(s);
if (url == null) return;
hostServices.showDocument(url);
// WebEngine webEngine = webViewLogin.getEngine();
//
// @SuppressWarnings("unchecked")
// ChangeListener<? super Worker.State>[] tipListener = new ChangeListener[1];
//
// tipListener[0] = (ov, oldValue, newValue) -> {
// if (newValue == Worker.State.SUCCEEDED) {
// String location = webEngine.getLocation();
// if (location.startsWith("http://cryptocrumb.com/success")) {
// String[] stuff = s.split(" - ");
// coinBaseAuth.saveToken(stuff[0], "tip");
// webEngine.getLoadWorker().stateProperty().removeListener(tipListener[0]);
// }
// }
// };
//
// webEngine.getLoadWorker().stateProperty().addListener(tipListener[0]);
// webEngine.load(url);
// paneLogin.setVisible(true);
}
开发者ID:shemnon,项目名称:FollowTheBitcoin,代码行数:41,代码来源:TipPanel.java
示例7: AquaSplitMenuButtonSkin
import javafx.scene.control.SplitMenuButton; //导入依赖的package包/类
public AquaSplitMenuButtonSkin(SplitMenuButton menuButton) {
super(menuButton);
registerChangeListener(menuButton.focusedProperty(), "FOCUSED");
if (getSkinnable().isFocused()) {
setFocusBorder();
} else {
setDropShadow();
}
}
开发者ID:cis422s14team5,项目名称:WatchlistPro,代码行数:11,代码来源:AquaSplitMenuButtonSkin.java
示例8: createNewButton
import javafx.scene.control.SplitMenuButton; //导入依赖的package包/类
private SplitMenuButton createNewButton() {
SplitMenuButton newButton = new SplitMenuButton(newTestcaseAction.getMenuItem(), etAction.getMenuItem());
newButton.setGraphic(newTestcaseAction.getButton().getGraphic());
newButton.setOnAction(newTestcaseAction.getButton().getOnAction());
return newButton;
}
开发者ID:jalian-systems,项目名称:marathonv5,代码行数:7,代码来源:DisplayWindow.java
示例9: BehaviorTextComposite
import javafx.scene.control.SplitMenuButton; //导入依赖的package包/类
public BehaviorTextComposite() {
// Top
smbReferences = new SplitMenuButton();
this.smbReferences.setText("Reference");
btnSearch = new Button("Search");
btnLoad = new Button("Load");
txtLoacation = new TextField();
// txtLoacation.setPrefWidth(Double.MAX_VALUE);
txtLoacation.setMaxWidth(Double.MAX_VALUE);
txtLoacation.setMinWidth(200d);
txtLoacation.setPrefWidth(400d);
smbReferences.setPrefWidth(200d);
HBox hBox = new HBox(smbReferences, txtLoacation, btnSearch, btnLoad);
hBox.setPrefWidth(Double.MAX_VALUE);
hBox.setMaxWidth(Double.MAX_VALUE);
HBox.getHgrow(txtLoacation);
hBox.setStyle("-fx-padding : 5px; -fx-spacing : 5px;");
Menu menuWindow = new Menu("Window");
MenuItem cmiShowFullText = new MenuItem("Show Full Text");
cmiShowFullText.setOnAction(ev -> {
if (this.wib != null) {
if (xmlStage != null) {
xmlStage.show();
return;
}
xmlStage = FxUtil.createStageAndShow(xmlEditor, stage -> {
stage.setTitle("XML - " + this.wib.getName());
stage.setWidth(800d);
stage.setHeight(600d);
});
}
});
menuWindow.getItems().add(cmiShowFullText);
MenuBar mbMaster = new MenuBar(menuWindow);
VBox top = new VBox(mbMaster, hBox);
setTop(top);
// Center
xmlEditor = new XMLEditor();
txtScript = new BehaviorTextArea();
splitPane = new SplitPane(txtScript);
splitPane.setOrientation(Orientation.HORIZONTAL);
tabPane = new TabPane();
mainTab = new Tab("main", splitPane);
mainTab.setClosable(false);
tabPane.getTabs().add(mainTab);
setCenter(tabPane);
// Events
this.btnSearch.setOnAction(this::btnSearchOnAction);
this.btnLoad.setOnAction(this::btnLoadOnAction);
// DragDrop
txtScript.setOnDragOver(this::txtScriptOnDagOver);
txtScript.setOnDragDropped(this::txtScriptOnDragDropped);
this.wib.addListener((oba, old, newval) -> {
if (newval != null && newval.exists()) {
tab.setText(newval.getName());
}
});
init();
}
开发者ID:callakrsos,项目名称:Gargoyle,代码行数:75,代码来源:BehaviorTextComposite.java
示例10: createMenuButton
import javafx.scene.control.SplitMenuButton; //导入依赖的package包/类
@Override
protected void createMenuButton() {
menuButton = new SplitMenuButton();
menuButton.setText("Menu Button");
}
开发者ID:teamfx,项目名称:openjfx-8u-dev-tests,代码行数:6,代码来源:SplitMenuButtonApp.java
示例11: getBtnRun
import javafx.scene.control.SplitMenuButton; //导入依赖的package包/类
public SplitMenuButton getBtnRun() {
return btnRun;
}
开发者ID:DigiArea,项目名称:closurefx-builder,代码行数:4,代码来源:GSSPageController.java
示例12: getBtnRun
import javafx.scene.control.SplitMenuButton; //导入依赖的package包/类
public SplitMenuButton getBtnRun() {
return btnRun;
}
开发者ID:DigiArea,项目名称:closurefx-builder,代码行数:4,代码来源:JSPageController.java
示例13: splitMenuButtonExpandCollapseAction
import javafx.scene.control.SplitMenuButton; //导入依赖的package包/类
public abstract void splitMenuButtonExpandCollapseAction(final SplitMenuButtonWrap<? extends SplitMenuButton> wrap);
开发者ID:teamfx,项目名称:openjfx-8u-dev-tests,代码行数:2,代码来源:ThemeDriverFactory.java
注:本文中的javafx.scene.control.SplitMenuButton类示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 |
请发表评论