本文整理了Java中javax.swing.JPopupMenu.removeAll()
方法的一些代码示例,展示了JPopupMenu.removeAll()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。JPopupMenu.removeAll()
方法的具体详情如下:
包路径:javax.swing.JPopupMenu
类名称:JPopupMenu
方法名:removeAll
暂无
代码示例来源:origin: apache/pdfbox
@Override
public Point getPopupLocation(MouseEvent event)
{
if (event != null)
{
TreePath path = getClosestPathForLocation(event.getX(), event.getY());
if (path == null)
{
return null;
}
setSelectionPath(path);
treePopupMenu.removeAll();
addPopupMenuItems(path);
return event.getPoint();
}
return null;
}
代码示例来源:origin: org.netbeans.api/org-openide-awt
private void handleOverflowAddittion(int visibleButtons) {
Component[] comps = getAllComponents();
removeAll();
overflowToolbar.setOrientation(getOrientation() == HORIZONTAL ? VERTICAL : HORIZONTAL);
popup.removeAll();
for (Component comp : comps) {
if (visibleButtons > 0) {
add(comp);
if (comp.isVisible()) {
visibleButtons--;
}
} else {
overflowToolbar.add(comp);
}
}
popup.add(overflowToolbar);
add(overflowButton);
}
代码示例来源:origin: org.netbeans.api/org-openide-awt
private void handleOverflowRemoval() {
if (overflowToolbar.getComponents().length > 0) {
remove(overflowButton);
handleIconResize();
for (Component comp : overflowToolbar.getComponents()) {
add(comp);
}
overflowToolbar.removeAll();
popup.removeAll();
}
}
代码示例来源:origin: com.googlecode.blaisemath/blaise-graphics
@Override
public void popupMenuCanceled(PopupMenuEvent e) {
popup.removeAll();
}
});
代码示例来源:origin: edu.toronto.cs.medsavant/medsavant-client
@Override
public void removeAll() {
if(popupMenu != null){
popupMenu.removeAll();
}
}
代码示例来源:origin: com.googlecode.blaisemath/blaise-graphics
@Override
public void popupMenuWillBecomeInvisible(PopupMenuEvent e) {
popup.removeAll();
}
@Override
代码示例来源:origin: GoldenGnu/jeveassets
private void restoreMenuItems() {
menu.removeAll();
for (Component component : menuItems) {
menu.add(component);
}
}
}
代码示例来源:origin: org.apache.jmeter/jorphan
private void restoreMenuItems() {
menu.removeAll();
for (Component component : menuItems) {
menu.add(component);
}
}
}
代码示例来源:origin: org.swinglabs.swingx/swingx-core
/**
* @inheritDoc
*
*/
@Override
public void removeAll() {
getPopupMenu().removeAll();
}
代码示例来源:origin: com.haulmont.thirdparty/swingx-core
/**
* @inheritDoc
*
*/
@Override
public void removeAll() {
getPopupMenu().removeAll();
}
代码示例来源:origin: org.codehaus.jtstand/jtstand-desktop
/**
* @inheritDoc
*
*/
public void removeAll() {
getPopupMenu().removeAll();
}
代码示例来源:origin: Audiveris/audiveris
private void buildRangesMenu ()
{
menu.removeAll();
ShapeSet.addAllShapeSets(menu, selectionListener);
}
代码示例来源:origin: Audiveris/audiveris
private void buildShapesMenu ()
{
menu.removeAll();
// Add all shapes within current range
ShapeSet.addSetShapes(ranges.current, menu, selectionListener);
}
代码示例来源:origin: org.swinglabs.swingx/swingx-all
/**
* @inheritDoc
*
*/
@Override
public void removeAll() {
getPopupMenu().removeAll();
}
代码示例来源:origin: net.imagej/imagej-ui-swing
@Override
public void popupMenuWillBecomeVisible(final PopupMenuEvent arg0) {
popupMenu.removeAll();
populatePopupMenu(getSelectedFiles(), popupMenu);
}
代码示例来源:origin: org.bidib.jbidib.swinglabs.swingx/swingx-core
/**
* @inheritDoc
*
*/
@Override
public void removeAll() {
getPopupMenu().removeAll();
}
代码示例来源:origin: org.appdapter/org.appdapter.lib.gui
@Override public void run() {
if (popup != null)
popup.removeAll();
if (menu != null)
menu.removeAll();
Collection objects0 = objects;
TriggerMenuController.this.objects = new ArrayList();
for (Object o : objects0) {
addMenuFromObject(o);
}
}
});
代码示例来源:origin: datacleaner/DataCleaner
public void setOnlyUpdatableDatastores(final boolean onlyUpdatableDatastores) {
_onlyUpdatableDatastores = onlyUpdatableDatastores;
final JPopupMenu menu = _createDatastoreButton.getMenu();
menu.removeAll();
populateCreateDatastoreMenu(menu);
}
代码示例来源:origin: org.opentcs.thirdparty.dockingframes/docking-frames-common
private void closing(){
closed = true;
menu.removePopupMenuListener( listener );
menu.removeAll();
fireClosed();
}
}
代码示例来源:origin: org.netbeans.modules/org-netbeans-modules-web-jsf
/** Gets popup menu. Overrides superclass. Adds lazy menu items creation. */
public JPopupMenu getPopupMenu() {
JPopupMenu pm = super.getPopupMenu();
pm.removeAll();
pm.add(new AddNavigationRuleAction());
pm.add(new AddNavigationCaseAction());
pm.add(new JSeparator());
pm.add(new AddManagedBeanAction());
pm.pack();
return pm;
}
}
内容来源于网络,如有侵权,请联系作者删除!