本文整理汇总了Java中com.vlsolutions.swing.docking.DockingDesktop类的典型用法代码示例。如果您正苦于以下问题:Java DockingDesktop类的具体用法?Java DockingDesktop怎么用?Java DockingDesktop使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
DockingDesktop类属于com.vlsolutions.swing.docking包,在下文中一共展示了DockingDesktop类的13个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的Java代码示例。
示例1: File
import com.vlsolutions.swing.docking.DockingDesktop; //导入依赖的package包/类
/**
*
* Saves the current workspace to a .xml file
*
* @param desk : the workspace container
* @param filename : the target file
*
*/
public static void saveWorkspace(DockingDesktop desk, String filename)
{
File saveFile = new File(filename);
try
{
BufferedOutputStream out = new BufferedOutputStream(new FileOutputStream(saveFile));
desk.writeXML(out);
out.close();
}
catch (IOException e)
{
e.printStackTrace();
return;
}
}
开发者ID:florentw,项目名称:java-membership-protocol,代码行数:25,代码来源:GUIWorkspaces.java
示例2: VLToolBar
import com.vlsolutions.swing.docking.DockingDesktop; //导入依赖的package包/类
/**
*
* Main constructor for the GUIToolbar class
*
* @param desk : the docking context
* @param frame : the containing frame
* @param h : the instance of the hypership
*
*/
public GUIToolbar(Component desk, Container frame, Hypership h)
{
hyper = h;
desktop = (DockingDesktop)desk;
container = ToolBarContainer.createDefaultContainer(true, true, true, true);
container.add(desktop, BorderLayout.CENTER);
frame.add(container, BorderLayout.CENTER);
ToolBarPanel topPanel = container.getToolBarPanelAt(BorderLayout.NORTH);
toolBarMS = new VLToolBar("Membership");
toolBarRP = new VLToolBar("Remote process control");
toolBarRPS = new VLToolBar("Remote process listing");
toolBarWork = new VLToolBar("Workspace handling");
toolBarExit = new VLToolBar("Exit");
initToolBarMS();
initToolBarRP();
initToolBarRPS();
initToolBarWork();
initToolBarExit();
topPanel.add(toolBarMS , new ToolBarConstraints(0,0));
topPanel.add(toolBarRP , new ToolBarConstraints(0,1));
topPanel.add(toolBarRPS , new ToolBarConstraints(0,2));
topPanel.add(toolBarWork , new ToolBarConstraints(0,3));
topPanel.add(toolBarExit , new ToolBarConstraints(0,4));
}
开发者ID:florentw,项目名称:java-membership-protocol,代码行数:35,代码来源:GUIToolbar.java
示例3: showTabInAllPerspectives
import com.vlsolutions.swing.docking.DockingDesktop; //导入依赖的package包/类
/**
* Shows the tab as a child of the given dockable in all perspectives.
*/
public void showTabInAllPerspectives(final Dockable dockable, final Dockable parent) {
DockableState dstate = context.getDockableState(dockable);
if (dstate != null && !dstate.isClosed()) {
return;
}
DockingDesktop dockingDesktop = context.getDesktopList().get(0);
context.registerDockable(dockable);
WSDockKey parentKey = new WSDockKey(parent.getDockKey().getKey());
WSDockKey key = new WSDockKey(dockable.getDockKey().getKey());
for (Perspective persp : model.getAllPerspectives()) {
if (persp == model.getSelectedPerspective()) {
continue;
}
// We don't need to show it if
// 1. We don't know the parent
// 2. We already have the child
boolean containsParent = persp.getWorkspace().getDesktop(0).containsNode(parentKey);
boolean containsChild = persp.getWorkspace().getDesktop(0).containsNode(key);
if (containsParent && !containsChild) {
persp.getWorkspace().getDesktop(0).createTab(parentKey, key, 1);
}
}
DockableState[] states = dockingDesktop.getDockables();
for (DockableState state : states) {
if (state.getDockable() == parent && !state.isClosed()) {
dockingDesktop.createTab(state.getDockable(), dockable, 1, true);
break;
}
}
}
开发者ID:transwarpio,项目名称:rapidminer,代码行数:38,代码来源:PerspectiveController.java
示例4: DockingDesktop
import com.vlsolutions.swing.docking.DockingDesktop; //导入依赖的package包/类
/**
*
* Main constructor for the Hypership GUI
* Initialize all the GUI widgets.
*
* @param s : the title of the frame
* @param glCanv : the contained OpenGL canvas
*
*/
public Hypership(String s, GLCanvas glCanv)
{
super(s);
desk = new DockingDesktop();
graphe = new GrapheMembership();
rendu = new Rendu();
init_graphe();
lastPicked = 0;
rendu.addObjet(graphe);
membership = new MSMain(this);
processManager = new GUIProcessManager();
pickedMember = new MSMember("", "", 0);
fileExplorePanel = new GUIFileExplorer();
infoPanel = new GUIInfos(this);
gl = new GUIOpenGL(glCanv, this);
rpsPanel = new GUIRps();
rpsPanel.sendInfo("Welcome to the membership.\n");
setDefaultCloseOperation(DISPOSE_ON_CLOSE);
toolBar = new GUIToolbar(desk, getContentPane(), this);
desk.addDockable(gl);
desk.split(gl, fileExplorePanel, DockingConstants.SPLIT_LEFT);
desk.split(gl, infoPanel, DockingConstants.SPLIT_RIGHT);
desk.split(infoPanel, rpsPanel, DockingConstants.SPLIT_BOTTOM);
desk.setDockableWidth(fileExplorePanel, 0.2);
desk.setDockableWidth(infoPanel, 0.2);
menuBar = new GUIMenu(toolBar);
this.setJMenuBar(menuBar);
}
开发者ID:florentw,项目名称:java-membership-protocol,代码行数:38,代码来源:Hypership.java
示例5: createControl
import com.vlsolutions.swing.docking.DockingDesktop; //导入依赖的package包/类
protected JComponent createControl() {
String name = getPageDescriptor().getId();
desktop = new DockingDesktop(name, getDockingContext());
desktop.setName(name);
DockableListener listener = new DockableListener();
desktop.addDockableStateChangeListener(listener);
desktop.addDockableStateWillChangeListener(listener);
desktop.addDockableSelectionListener(listener);
if (initialLayout != null) {
try {
InputStream in = initialLayout.getInputStream();
desktop.getContext().readXML(in);
in.close();
} catch (IOException ioe) {
logger.warn("Error reading workspace layout " + initialLayout + ", using defaults", ioe);
getPageDescriptor().buildInitialLayout(this);
} catch (SAXException saxe) {
logger.warn("Error parsing workspace layout " + initialLayout + ", using defaults", saxe);
getPageDescriptor().buildInitialLayout(this);
} catch (ParserConfigurationException pce) {
logger.warn("Error parsing workspace layout " + initialLayout + ", using defaults", pce);
getPageDescriptor().buildInitialLayout(this);
}
if (desktop.getDockables().length == 0) {
getPageDescriptor().buildInitialLayout(this);
}
} else {
getPageDescriptor().buildInitialLayout(this);
}
return desktop;
}
开发者ID:shevek,项目名称:spring-rich-client,代码行数:33,代码来源:VLDockingApplicationPage.java
示例6: showTabInAllPerspectives
import com.vlsolutions.swing.docking.DockingDesktop; //导入依赖的package包/类
/** Shows the tab as a child of the given dockable in all perspectives. */
public void showTabInAllPerspectives(Dockable dockable, Dockable parent) {
DockableState dstate = context.getDockableState(dockable);
if ((dstate != null) && (!dstate.isClosed())) {
return;
}
DockingDesktop dockingDesktop = context.getDesktopList().get(0);
context.registerDockable(dockable);
//dockingDesktop.registerDockable(dockable);
WSDockKey parentKey = new WSDockKey(parent.getDockKey().getKey());
WSDockKey key = new WSDockKey(dockable.getDockKey().getKey());
for (Perspective persp : perspectives.values()) {
if (persp == current) {
continue;
}
// We don't need to show it if
// 1. We don't know the parent
// 2. We already have the child
boolean containsParent = persp.getWorkspace().getDesktop(0).containsNode(parentKey);
boolean containsChild = persp.getWorkspace().getDesktop(0).containsNode(key);
if (containsParent && !containsChild) {
persp.getWorkspace().getDesktop(0).createTab(parentKey, key, 1);
}
}
DockableState[] states = dockingDesktop.getDockables();
for (DockableState state : states) {
if ((state.getDockable() == parent) && !state.isClosed()) {
dockingDesktop.createTab(state.getDockable(), dockable, 1, true);
break;
}
}
}
开发者ID:rapidminer,项目名称:rapidminer-5,代码行数:37,代码来源:ApplicationPerspectives.java
示例7: getDockingDesktop
import com.vlsolutions.swing.docking.DockingDesktop; //导入依赖的package包/类
public DockingDesktop getDockingDesktop() {
return dockingDesktop;
}
开发者ID:transwarpio,项目名称:rapidminer,代码行数:4,代码来源:MainFrame.java
示例8: getDockingDesktop
import com.vlsolutions.swing.docking.DockingDesktop; //导入依赖的package包/类
/** the DockingDesktop of the UI */
protected DockingDesktop getDockingDesktop() {
return desktop;
}
开发者ID:transwarpio,项目名称:rapidminer,代码行数:5,代码来源:BubbleWindow.java
示例9: addDockable
import com.vlsolutions.swing.docking.DockingDesktop; //导入依赖的package包/类
public void addDockable(DockingDesktop desktop, Dockable dockable) {
desktop.addDockable(dockable);
}
开发者ID:shevek,项目名称:spring-rich-client,代码行数:4,代码来源:VLDockingApplicationPage.java
示例10: removeDockable
import com.vlsolutions.swing.docking.DockingDesktop; //导入依赖的package包/类
public void removeDockable(DockingDesktop desktop, Dockable dockable) {
desktop.remove(dockable);
}
开发者ID:shevek,项目名称:spring-rich-client,代码行数:4,代码来源:VLDockingApplicationPage.java
示例11: addDockable
import com.vlsolutions.swing.docking.DockingDesktop; //导入依赖的package包/类
void addDockable(DockingDesktop desktop, Dockable dockable);
开发者ID:shevek,项目名称:spring-rich-client,代码行数:2,代码来源:VLDockingLayoutManager.java
示例12: removeDockable
import com.vlsolutions.swing.docking.DockingDesktop; //导入依赖的package包/类
void removeDockable(DockingDesktop desktop, Dockable dockable);
开发者ID:shevek,项目名称:spring-rich-client,代码行数:2,代码来源:VLDockingLayoutManager.java
示例13: layoutDockables
import com.vlsolutions.swing.docking.DockingDesktop; //导入依赖的package包/类
void layoutDockables(DockingDesktop desktop);
开发者ID:shevek,项目名称:spring-rich-client,代码行数:2,代码来源:VLDockingLayoutBuilder.java
注:本文中的com.vlsolutions.swing.docking.DockingDesktop类示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 |
请发表评论