本文整理了Java中javax.swing.JScrollPane.remove()
方法的一些代码示例,展示了JScrollPane.remove()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。JScrollPane.remove()
方法的具体详情如下:
包路径:javax.swing.JScrollPane
类名称:JScrollPane
方法名:remove
暂无
代码示例来源:origin: ron190/jsql-injection
private ControlPanel(JScrollPane scrollPane) {
this.setLayout(new BorderLayout());
this.setOpaque(false);
this.vScrollBar = new JMyScrollBar(Adjustable.VERTICAL);
scrollPane.setVerticalScrollBar(this.vScrollBar);
scrollPane.remove(this.vScrollBar);
if (scrollPane.getVerticalScrollBarPolicy() != ScrollPaneConstants.VERTICAL_SCROLLBAR_NEVER) {
this.add(this.vScrollBar, BorderLayout.EAST);
}
this.hScrollBar = new JMyScrollBar(Adjustable.HORIZONTAL);
scrollPane.setHorizontalScrollBar(this.hScrollBar);
scrollPane.remove(this.hScrollBar);
if (scrollPane.getHorizontalScrollBarPolicy() != ScrollPaneConstants.HORIZONTAL_SCROLLBAR_NEVER) {
this.add(this.hScrollBar, BorderLayout.SOUTH);
}
}
}
代码示例来源:origin: org.icepdf.os/icepdf-viewer
public void closeDocument() {
// remove re-size listener.
documentViewScrollPane.removeComponentListener(this);
// dispose the view
if (documentView != null) {
documentViewScrollPane.remove((JComponent) documentView);
documentView.dispose();
documentView = null;
}
// close current document
if (documentViewModel != null) {
documentViewModel.dispose();
documentViewModel = null;
}
// setFitMode(PAGE_FIT_NONE);
setCurrentPageIndex(0);
setZoom(1);
setRotation(0);
// setToolMode(DocumentViewModelImpl.DISPLAY_TOOL_NONE);
setViewCursor(DocumentViewControllerImpl.CURSOR_DEFAULT);
}
代码示例来源:origin: org.netbeans.api/org-openide-explorer
@Override
public void remove(Component comp) {
if (comp == searchPanel) {
searchPanel = null;
}
super.remove(comp);
}
代码示例来源:origin: org.netbeans.api/org-openide-explorer
@Override
public void remove(Component comp) {
if (comp == searchPanel) {
searchPanel = null;
}
super.remove(comp);
}
代码示例来源:origin: lbalazscs/Pixelitor
private void setLayersPanel(LayersPanel newLayersPanel) {
if (layersPanel == newLayersPanel) {
return;
}
if (layersPanel != null) {
scrollPane.remove(layersPanel);
}
layersPanel = newLayersPanel;
scrollPane.setViewportView(newLayersPanel);
}
代码示例来源:origin: UNIVALI-LITE/Portugol-Studio
public void ocultarPainelPlugins() {
scrollInspetor.remove(painelConfigPlugins);
scrollInspetor.setViewportView(inspetorDeSimbolos);
divisorArvoreInspetor.setDividerLocation(-1);
}
代码示例来源:origin: UNIVALI-LITE/Portugol-Studio
public void exibirPainelPlugins() {
scrollInspetor.remove(inspetorDeSimbolos);
scrollInspetor.setViewportView(painelConfigPlugins);
divisorArvoreInspetor.setDividerLocation(0.7);
painelInspetorArvore.validate();
}
代码示例来源:origin: org.databene/jdbacl
public void setEnvironment(String environment) throws ConnectFailedException, ImportFailedException {
if (importer != null) {
try {
importer.close();
} catch (IOException e) {
LOGGER.error("Error closing " + getClass().getName(), e);
}
if (tree != null)
scrollPane.remove(tree);
}
new Thread(new Importer(environment)).start();
}
代码示例来源:origin: UNIVALI-LITE/Portugol-Studio
private void listaPluginsMouseClicked(java.awt.event.MouseEvent evt) {//GEN-FIRST:event_listaPluginsMouseClicked
final int index = ((JList) evt.getSource()).getSelectedIndex();
final Plugin plugin = plugins.get(index);
painelPlugins = new PainelPlugins();
painelPlugins.setAbaCodigoFonte(abaCodigoFonte);
painelPlugins.setPlugin(plugin);
if (plugin.getVisao() != null) {
painelPlugins.add(plugin.getVisao());
}
abaCodigoFonte.getScrollInspetor().remove(this);
abaCodigoFonte.getScrollInspetor().setViewportView(painelPlugins);
//divisorArvoreInspetor.setDividerLocation(0.7);
//painelInspetorArvore.validate();*/
}//GEN-LAST:event_listaPluginsMouseClicked
代码示例来源:origin: net.sf.jcgrid/jcgrid
sPane.remove(tStats);
代码示例来源:origin: org.codehaus.izpack/izpack-panel
tableScroller.remove(packsTable.getTableHeader());
tableScroller.setColumnHeaderView(null);
tableScroller.setColumnHeader(null);
代码示例来源:origin: org.appdapter/org.appdapter.lib.gui
sp.remove(table);
jc.remove(sp);
jc.add(table);
代码示例来源:origin: net.sourceforge.ondex.apps/ovtk2
public void cmdToFrame(JScrollPane scrollingArea) {
frame.remove(scrollingArea);
JInternalFrame cmdFrame = new RegisteredJInternalFrame("Scripting", "Console", "Command console", true, false, false, true);
cmdFrame.add(scrollingArea);
cmdFrame.setVisible(true);
cmdFrame.pack();
int height = frame.getSize().height / 4;
int width = 1000;
int yPosition = frame.getSize().height - height;
if (height < 68) {
height = 68;
yPosition = 0;
}
if (width > frame.getSize().width) {
width = frame.getSize().width;
}
scrollingArea.getViewport().setPreferredSize(new Dimension(width, height));
cmdFrame.setSize(width, height);
cmdFrame.setLocation(-4, yPosition - 87);
desktop.add(cmdFrame);
}
代码示例来源:origin: org.icepdf.os/icepdf-viewer
/**
* Sets the view type, one column, two column, single page etc.
*/
protected void setViewType() {
// check if there is current view, if so dispose it
if (documentView != null) {
documentViewScrollPane.remove((JComponent) documentView);
documentViewScrollPane.validate();
documentView.dispose();
}
if (documentViewModel == null) {
return;
}
// create the desired view with the current viewModel.
createDocumentView(viewType);
// as it may have been inactive
// notify the view of the tool change
documentView.setToolMode(documentViewModel.getViewToolMode());
// add the new view the scroll pane
documentViewScrollPane.setViewportView((Component) documentView);
documentViewScrollPane.validate();
// re-apply the fit mode
viewerController.setPageFitMode(viewportFitMode, true);
// set current page
setCurrentPageIndex(documentViewModel.getViewCurrentPageIndex());
}
代码示例来源:origin: org.gdl-lang.gdl-tools/openehr-utils-gui-swing
public void changeRootNode(SelectableNode<?> node) {
rootNode = node;
ArrayList<MouseListener> listeners = getJTree().getExtraMouseListeners();
jTree = null;
getJScrollPane().remove(getJTree());
for (MouseListener listener : listeners) {
getJTree().addExtraMouseListener(listener);
}
ArrayList<TreeSelectionListener> tsListeners = getJTree().getExtraTreeSelectionListeners();
for (TreeSelectionListener listener : tsListeners) {
getJTree().addExtraTreeSelectionListener(listener);
}
getJScrollPane().setViewportView(getJTree());
getJScrollPane().revalidate();
getJScrollPane().repaint();
}
内容来源于网络,如有侵权,请联系作者删除!