本文整理了Java中javax.swing.JSplitPane.validate()
方法的一些代码示例,展示了JSplitPane.validate()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。JSplitPane.validate()
方法的具体详情如下:
包路径:javax.swing.JSplitPane
类名称:JSplitPane
方法名:validate
暂无
代码示例来源:origin: nodebox/nodebox
private void split(int orientation) {
Container parent = getParent();
if (parent instanceof JSplitPane) {
JSplitPane parentSplit = (JSplitPane) parent;
boolean first = parentSplit.getTopComponent() == this;
if (first) {
parentSplit.setTopComponent(null);
} else {
parentSplit.setBottomComponent(null);
}
CustomSplitPane split = new CustomSplitPane(orientation, this, this.duplicate());
if (first) {
parentSplit.setTopComponent(split);
} else {
parentSplit.setBottomComponent(split);
}
parentSplit.validate();
} else {
parent.remove(this);
CustomSplitPane split = new CustomSplitPane(orientation, this, this.duplicate());
parent.add(split);
parent.validate();
}
}
代码示例来源:origin: org.netbeans.modules/org-netbeans-modules-notifications
@Override
public void run() {
splitPane.setDividerLocation(0.6);
splitPane.validate(); // Have to validate to properly update column sizes
updateTableColumnSizes();
}
});
代码示例来源:origin: stackoverflow.com
/**
* Set the location of the the given split pane to the given
* value later on the EDT, and validate the split pane
*
* @param splitPane The split pane
* @param location The location
*/
static void setDividerLocation(
final JSplitPane splitPane, final double location)
{
SwingUtilities.invokeLater(new Runnable()
{
@Override
public void run()
{
splitPane.setDividerLocation(location);
splitPane.validate();
}
});
}
代码示例来源:origin: net.sourceforge.mydoggy/mydoggy-plaf
public void setMainContent(Component content) {
if (content == null)
resetMainContent();
else {
if (dockableMainContentMode) {
oldMainContent = content;
} else {
mainContainer.setOpaque(false);
mainContainer.removeAll();
mainContainer.add(content, "0,0,FULL,FULL");
mainSplitPane.invalidate();
mainSplitPane.validate();
SwingUtil.repaint(mainSplitPane);
}
}
}
代码示例来源:origin: org.apache.cayenne.modeler/cayenne-modeler
/**
* Plugs a component in the frame, between main area and status bar
*/
public void setDockComponent(Component c) {
if (dockComponent == c) {
return;
}
if (dockComponent != null) {
splitPane.setBottomComponent(null);
}
dockComponent = c;
if (dockComponent != null) {
splitPane.setBottomComponent(dockComponent);
}
splitPane.validate();
}
代码示例来源:origin: de.richtercloud/flexdock-core
split.validate();
return;
代码示例来源:origin: triplea-game/triplea
private void showCommentLog() {
if (chatPanel != null) {
commentSplit.setBottomComponent(chatPanel);
chatSplit.setBottomComponent(commentSplit);
chatSplit.validate();
} else {
mapAndChatPanel.removeAll();
chatSplit.setTopComponent(mapPanel);
chatSplit.setBottomComponent(commentPanel);
mapAndChatPanel.add(chatSplit, BorderLayout.CENTER);
mapAndChatPanel.validate();
}
}
代码示例来源:origin: triplea-game/triplea
private void hideCommentLog() {
if (chatPanel != null) {
commentSplit.setBottomComponent(null);
chatSplit.setBottomComponent(chatPanel);
chatSplit.validate();
} else {
mapAndChatPanel.removeAll();
chatSplit.setTopComponent(null);
chatSplit.setBottomComponent(null);
mapAndChatPanel.add(mapPanel, BorderLayout.CENTER);
mapAndChatPanel.validate();
}
}
代码示例来源:origin: de.richtercloud/flexdock-core
private void deferSplitDividerReset(final JSplitPane splitPane) {
applySplitDividerLocation(splitPane);
// we don't need to defer split divider location reset until after
// a DockingSplitPane has rendered, since that class is able to figure
// out its proper divider location by itself.
if (splitPane instanceof DockingSplitPane) {
return;
}
// check to see if we've rendered
int size = SwingUtility.getSplitPaneSize(splitPane);
if (splitPane.isVisible() && size > 0 && EventQueue.isDispatchThread()) {
// if so, apply the split divider location and return
applySplitDividerLocation(splitPane);
splitPane.validate();
return;
}
// otherwise, defer applying the divider location reset until
// the split pane is rendered.
EventQueue.invokeLater(new Runnable() {
@Override
public void run() {
deferSplitDividerReset(splitPane);
}
});
}
代码示例来源:origin: mikaelhg/openblocks
public void componentResized(ComponentEvent e) {
miniMap.repositionMiniMap();
blockCanvas.reformBlockCanvas();
blockCanvasLayer.setSize(getSize());
blockCanvasLayer.validate();
}
});
代码示例来源:origin: uk.org.mygrid.taverna.scufl.scufl-ui-components/workflow-input-panel
removeButton.setEnabled(false);
splitter.validate();
代码示例来源:origin: de.richtercloud/flexdock-core
split.validate();
split.validate();
代码示例来源:origin: edu.utah.bmi.nlp/nlp-core
collectionReaderPanel.validate();
collectionReaderPanel.validate();
mainSplitPane.validate();
代码示例来源:origin: edu.utah.bmi.nlp/nlp-core
mainSplitPane.validate();
代码示例来源:origin: org.apache.uima/uimaj-tools
collectionReaderPanel.validate();
collectionReaderPanel.validate();
mainSplitPane.validate();
代码示例来源:origin: org.apache.uima/uimaj-tools
mainSplitPane.validate();
内容来源于网络,如有侵权,请联系作者删除!