当前位置: 首页>>代码示例>>Java>>正文


Java FilterSetting类代码示例

本文整理汇总了Java中com.sun.hotspot.igv.filter.FilterSetting的典型用法代码示例。如果您正苦于以下问题:Java FilterSetting类的具体用法?Java FilterSetting怎么用?Java FilterSetting使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。


FilterSetting类属于com.sun.hotspot.igv.filter包,在下文中一共展示了FilterSetting类的7个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。

示例1: updateComboBoxSelection

import com.sun.hotspot.igv.filter.FilterSetting; //导入依赖的package包/类
private void updateComboBoxSelection() {
    List<Filter> filters = this.getFilterChain().getFilters();
    boolean found = false;
    for (FilterSetting s : filterSettings) {
        if (s.getFilterCount() == filters.size()) {
            boolean ok = true;
            for (Filter f : filters) {
                if (!s.containsFilter(f)) {
                    ok = false;
                }
            }

            if (ok) {
                if (comboBox.getSelectedItem() != s) {
                    comboBox.setSelectedItem(s);
                }
                found = true;
                break;
            }
        }
    }

    if (!found && comboBox.getSelectedItem() != customFilterSetting) {
        comboBox.setSelectedItem(customFilterSetting);
    }
}
 
开发者ID:arodchen,项目名称:MaxSim,代码行数:27,代码来源:FilterTopComponent.java

示例2: readExternal

import com.sun.hotspot.igv.filter.FilterSetting; //导入依赖的package包/类
@Override
public void readExternal(ObjectInput in) throws IOException, ClassNotFoundException {
    super.readExternal(in);

    int filterSettingsCount = in.readInt();
    for (int i = 0; i < filterSettingsCount; i++) {
        String name = in.readUTF();
        FilterSetting s = new FilterSetting(name);
        int filterCount = in.readInt();
        for (int j = 0; j < filterCount; j++) {
            String filterName = in.readUTF();
            CustomFilter filter = findFilter(filterName);
            if (filter != null) {
                s.addFilter(filter);
            }
        }

        filterSettings.add(s);
    }
    updateComboBox();
}
 
开发者ID:arodchen,项目名称:MaxSim,代码行数:22,代码来源:FilterTopComponent.java

示例3: updateComboBox

import com.sun.hotspot.igv.filter.FilterSetting; //导入依赖的package包/类
private void updateComboBox() {
    comboBox.removeAllItems();
    comboBox.addItem(customFilterSetting);
    for (FilterSetting s : filterSettings) {
        comboBox.addItem(s);
    }

    this.updateComboBoxSelection();
}
 
开发者ID:arodchen,项目名称:MaxSim,代码行数:10,代码来源:FilterTopComponent.java

示例4: addFilterSetting

import com.sun.hotspot.igv.filter.FilterSetting; //导入依赖的package包/类
public void addFilterSetting() {
    NotifyDescriptor.InputLine l = new NotifyDescriptor.InputLine("Name of the new profile:", "Filter Profile");
    if (DialogDisplayer.getDefault().notify(l) == NotifyDescriptor.OK_OPTION) {
        String name = l.getInputText();

        FilterSetting toRemove = null;
        for (FilterSetting s : filterSettings) {
            if (s.getName().equals(name)) {
                NotifyDescriptor.Confirmation conf = new NotifyDescriptor.Confirmation("Filter profile \"" + name + "\" already exists, do you want to replace it?", "Filter");
                if (DialogDisplayer.getDefault().notify(conf) == NotifyDescriptor.YES_OPTION) {
                    toRemove = s;
                    break;
                } else {
                    return;
                }
            }
        }

        if (toRemove != null) {
            filterSettings.remove(toRemove);
        }
        FilterSetting setting = createFilterSetting(name);
        filterSettings.add(setting);

        // Sort alphabetically
        Collections.sort(filterSettings, new Comparator<FilterSetting>() {

            @Override
            public int compare(FilterSetting o1, FilterSetting o2) {
                return o1.getName().compareTo(o2.getName());
            }
        });

        updateComboBox();
    }
}
 
开发者ID:arodchen,项目名称:MaxSim,代码行数:37,代码来源:FilterTopComponent.java

示例5: createFilterSetting

import com.sun.hotspot.igv.filter.FilterSetting; //导入依赖的package包/类
private FilterSetting createFilterSetting(String name) {
    FilterSetting s = new FilterSetting(name);
    FilterChain chain = this.getFilterChain();
    for (Filter f : chain.getFilters()) {
        s.addFilter(f);
    }
    return s;
}
 
开发者ID:arodchen,项目名称:MaxSim,代码行数:9,代码来源:FilterTopComponent.java

示例6: addFilterSetting

import com.sun.hotspot.igv.filter.FilterSetting; //导入依赖的package包/类
public void addFilterSetting() {
    NotifyDescriptor.InputLine l = new NotifyDescriptor.InputLine("Enter a name:", "Filter");
    if (DialogDisplayer.getDefault().notify(l) == NotifyDescriptor.OK_OPTION) {
        String name = l.getInputText();

        FilterSetting toRemove = null;
        for (FilterSetting s : filterSettings) {
            if (s.getName().equals(name)) {
                NotifyDescriptor.Confirmation conf = new NotifyDescriptor.Confirmation("Filter \"" + name + "\" already exists, to you want to overwrite?", "Filter");
                if (DialogDisplayer.getDefault().notify(conf) == NotifyDescriptor.YES_OPTION) {
                    toRemove = s;
                    break;
                } else {
                    return;
                }
            }
        }

        if (toRemove != null) {
            filterSettings.remove(toRemove);
        }
        FilterSetting setting = createFilterSetting(name);
        filterSettings.add(setting);

        // Sort alphabetically
        Collections.sort(filterSettings, new Comparator<FilterSetting>() {

            public int compare(FilterSetting o1, FilterSetting o2) {
                return o1.getName().compareTo(o2.getName());
            }
        });

        updateComboBox();
    }
}
 
开发者ID:ojdkbuild,项目名称:lookaside_java-1.8.0-openjdk,代码行数:36,代码来源:FilterTopComponent.java

示例7: FilterTopComponent

import com.sun.hotspot.igv.filter.FilterSetting; //导入依赖的package包/类
private FilterTopComponent() {
    filterSettingsChangedEvent = new ChangedEvent<FilterTopComponent>(this);
    initComponents();
    setName(NbBundle.getMessage(FilterTopComponent.class, "CTL_FilterTopComponent"));
    setToolTipText(NbBundle.getMessage(FilterTopComponent.class, "HINT_FilterTopComponent"));
    //        setIcon(Utilities.loadImage(ICON_PATH, true));

    sequence = new FilterChain();
    filterChain = new FilterChain();
    initFilters();
    manager = new ExplorerManager();
    manager.setRootContext(new AbstractNode(new FilterChildren()));
    associateLookup(ExplorerUtils.createLookup(manager, getActionMap()));
    view = new CheckListView();

    ToolbarPool.getDefault().setPreferredIconSize(16);
    Toolbar toolBar = new Toolbar();
    Border b = (Border) UIManager.get("Nb.Editor.Toolbar.border"); //NOI18N
    toolBar.setBorder(b);
    comboBox = new JComboBox();
    toolBar.add(comboBox);
    this.add(toolBar, BorderLayout.NORTH);
    toolBar.add(SaveFilterSettingsAction.get(SaveFilterSettingsAction.class));
    toolBar.add(RemoveFilterSettingsAction.get(RemoveFilterSettingsAction.class));
    toolBar.addSeparator();
    toolBar.add(MoveFilterUpAction.get(MoveFilterUpAction.class).createContextAwareInstance(this.getLookup()));
    toolBar.add(MoveFilterDownAction.get(MoveFilterDownAction.class).createContextAwareInstance(this.getLookup()));
    toolBar.add(RemoveFilterAction.get(RemoveFilterAction.class).createContextAwareInstance(this.getLookup()));
    toolBar.add(NewFilterAction.get(NewFilterAction.class));
    this.add(view, BorderLayout.CENTER);

    filterSettings = new ArrayList<FilterSetting>();
    updateComboBox();

    comboBox.addActionListener(comboBoxActionListener);
    setChain(filterChain);
}
 
开发者ID:ojdkbuild,项目名称:lookaside_java-1.8.0-openjdk,代码行数:38,代码来源:FilterTopComponent.java


注:本文中的com.sun.hotspot.igv.filter.FilterSetting类示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。