本文整理汇总了Java中javafx.scene.control.Tab.getContent方法的典型用法代码示例。如果您正苦于以下问题:Java Tab.getContent方法的具体用法?Java Tab.getContent怎么用?Java Tab.getContent使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类javafx.scene.control.Tab
的用法示例。
在下文中一共展示了Tab.getContent方法的11个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: remove
import javafx.scene.control.Tab; //导入方法依赖的package包/类
@Override public void remove(Node node) {
node.getProperties().remove(DockingDesktop.DOCKING_CONTAINER);
ObservableList<Tab> tabs = getTabs();
Tab found = null;
for (Tab tab : tabs) {
if (tab.getContent() == node) {
found = tab;
break;
}
}
if (found != null) {
tabs.remove(found);
}
if (tabs.size() == 0) {
((IDockingContainer) getProperties().get(DockingDesktop.DOCKING_CONTAINER)).remove(this);
}
}
示例2: replace
import javafx.scene.control.Tab; //导入方法依赖的package包/类
@Override public void replace(Node base, INewDockingContainer indc) {
ObservableList<Tab> tabs = getTabs();
Tab found = null;
for (Tab tab : tabs) {
if (tab.getContent() == base) {
found = tab;
break;
}
}
if (found != null) {
int index = tabs.indexOf(found);
tabs.remove(index);
found.setContent(indc.get());
tabs.add(index, found);
}
}
示例3: getDockables
import javafx.scene.control.Tab; //导入方法依赖的package包/类
@Override public void getDockables(List<DockableState> dockables) {
ObservableList<Tab> tabs = getTabs();
for (Tab tab : tabs) {
if (tab.getContent() instanceof IDockingContainer) {
((IDockingContainer) tab.getContent()).getDockables(dockables);
} else {
for (Dockable dockable : this.dockables) {
Node component = dockable.getComponent();
Node content = tab.getContent();
if (component == content) {
dockables.add(dockable.getDockableState());
}
}
}
}
}
示例4: changed
import javafx.scene.control.Tab; //导入方法依赖的package包/类
@Override public void changed(ObservableValue<? extends Tab> observable, Tab oldValue, Tab newValue) {
Dockable o = null, n = null;
for (Dockable d : dockables) {
if (oldValue != null && oldValue.getContent() == d.getComponent()) {
o = d;
}
if (newValue != null && newValue.getContent() == d.getComponent()) {
n = d;
}
}
desktop.fireDockableSelectionEvent(o, n);
}
示例5: debugPrint
import javafx.scene.control.Tab; //导入方法依赖的package包/类
@Override public void debugPrint(String indent) {
System.out.println(indent + "tab(" + getProperties().get(DockingDesktop.DOCKING_CONTAINER) + ")");
ObservableList<Tab> tabs = getTabs();
for (Tab tab : tabs) {
if (tab.getContent() instanceof IDockingContainer) {
((IDockingContainer) tab.getContent()).debugPrint(indent + " ");
} else {
System.out.println(indent + " " + tab.getText());
}
}
}
示例6: getSelectedDockable
import javafx.scene.control.Tab; //导入方法依赖的package包/类
@Override public Dockable getSelectedDockable() {
Tab selected = getSelectionModel().getSelectedItem();
if (selected != null) {
for (Dockable dockable : dockables) {
if (dockable.getComponent() == selected.getContent()) {
return dockable;
}
}
}
return null;
}
示例7: findIndex
import javafx.scene.control.Tab; //导入方法依赖的package包/类
private int findIndex(Dockable dockable) {
ObservableList<Tab> tabs = getTabs();
int index = 0;
for (Tab tab : tabs) {
if (tab.getContent() == dockable.getComponent()) {
return index;
}
index++;
}
return -1;
}
示例8: setSelectedDockable
import javafx.scene.control.Tab; //导入方法依赖的package包/类
@Override public void setSelectedDockable(Dockable dockable) {
ObservableList<Tab> tabs = getTabs();
for (Tab tab : tabs) {
if (tab.getContent() == dockable.getComponent()) {
getSelectionModel().select(tab);
}
}
}
示例9: getActiveCodeEditor
import javafx.scene.control.Tab; //导入方法依赖的package包/类
private CodeEditor getActiveCodeEditor()
{
Tab activeTab = openProjectsPanel.getSelectionModel().getSelectedItem();
if (activeTab == null)
return null;
Node tabContents = activeTab.getContent();
if (tabContents != null)
return (CodeEditor) tabContents;
else
return null;
}
示例10: editCopy
import javafx.scene.control.Tab; //导入方法依赖的package包/类
@Override
public void editCopy()
{
Tab tab = openProjectsPanel.getSelectionModel().getSelectedItem();
CodeEditor ed = (CodeEditor)tab.getContent();
ed.copySelectionToClipboard();
}
示例11: editUndo
import javafx.scene.control.Tab; //导入方法依赖的package包/类
@Override
public void editUndo()
{
Tab tab = openProjectsPanel.getSelectionModel().getSelectedItem();
CodeEditor ed = (CodeEditor)tab.getContent();
ed.undoText();
}