本文整理汇总了Java中com.canoo.dolphin.client.ClientContext类的典型用法代码示例。如果您正苦于以下问题:Java ClientContext类的具体用法?Java ClientContext怎么用?Java ClientContext使用的例子?那么, 这里精选的类代码示例或许可以为您提供帮助。
ClientContext类属于com.canoo.dolphin.client包,在下文中一共展示了ClientContext类的5个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: MasterView
import com.canoo.dolphin.client.ClientContext; //导入依赖的package包/类
public MasterView(ClientContext clientContext) {
super(clientContext, Constants.MASTER_CONTROLLER_NAME);
listView = new ListView<>();
listView.setCellFactory(c -> new StockItemListCell());
rootNode = new StackPane(listView);
selectedStockIdent = new ReadOnlyStringWrapper();
listView.getSelectionModel().selectedItemProperty().addListener((obs, oldVal, newVal) -> {
if (newVal == null) {
selectedStockIdent.set(null);
getModel().setSelectedStockIdent(null);
} else {
selectedStockIdent.set(newVal.getStockIdent());
getModel().setSelectedStockIdent(newVal.getStockIdent());
}
});
}
示例2: ToDoView
import com.canoo.dolphin.client.ClientContext; //导入依赖的package包/类
public ToDoView(ClientContext clientContext) {
super(clientContext, Constants.TODO_CONTROLLER_NAME);
//Define the layout
todoList = new ListView<>();
resetButton = new Button("reset");
removeButton = new Button("remove");
ToolBar toolBar = new ToolBar(removeButton, resetButton);
pane = new BorderPane();
pane.setCenter(todoList);
pane.setTop(toolBar);
}
示例3: start
import com.canoo.dolphin.client.ClientContext; //导入依赖的package包/类
@Override
protected void start(Stage primaryStage, ClientContext clientContext) throws Exception {
MasterView masterView = new MasterView(clientContext);
DetailView detailView = new DetailView(clientContext);
masterView.selectedStockIdentProperty().addListener((obs, oldVal, newVal) -> detailView.showStock(newVal));
HBox mainPane = new HBox(masterView.getRootNode(), detailView.getRootNode());
mainPane.setSpacing(12);
mainPane.setPadding(new Insets(12));
HBox.setHgrow(masterView.getRootNode(), Priority.NEVER);
HBox.setHgrow(detailView.getRootNode(), Priority.ALWAYS);
primaryStage.setScene(new Scene(mainPane));
primaryStage.show();
}
示例4: DetailView
import com.canoo.dolphin.client.ClientContext; //导入依赖的package包/类
public DetailView(ClientContext clientContext) throws IOException {
super(clientContext, Constants.DETAIL_CONTROLLER_NAME, DetailView.class.getResource("detailView.fxml"));
}
示例5: MyViewBinder
import com.canoo.dolphin.client.ClientContext; //导入依赖的package包/类
public MyViewBinder(ClientContext clientContext) {
super(clientContext, Constants.CONTROLLER_NAME);
}