• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    公众号

Java Customizer类代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

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



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

示例1: CustomizerDialog

import java.beans.Customizer; //导入依赖的package包/类
/**
 * Constructor taking the parent frame, the customizer component
 * and the target bean as arguments.
 */
public CustomizerDialog(Frame frame, Customizer customizer, Object target) {
    super(frame, customizer.getClass().getName(), true);
    setLayout(null);

    body = (Component) customizer;
    add(body);

    doneButton = new Button("Done");
    doneButton.addActionListener(this);
    add(doneButton);

    int x = frame.getLocation().x + 30;
    int y = frame.getLocation().y + 100;
    setLocation(x, y);

    setVisible(true);
}
 
开发者ID:d2fn,项目名称:passage,代码行数:22,代码来源:CustomizerDialog.java


示例2: setValues

import java.beans.Customizer; //导入依赖的package包/类
/**
 * Get values from element to fill propertyMap and setup customizer 
 * @param element TestElement
 */
private void setValues(TestElement element) {
    // Copy all property values into the map:
    for (PropertyIterator jprops = element.propertyIterator(); jprops.hasNext();) {
        JMeterProperty jprop = jprops.next();
        propertyMap.put(jprop.getName(), jprop.getObjectValue());
    }
    
    if (customizer != null) {
        customizer.setObject(propertyMap);
    } else {
        if (initialized){
            remove(customizerIndexInPanel);
        }
        Customizer c = customizers.get(element);
        if (c == null) {
            c = createCustomizer();
            c.setObject(propertyMap);
            customizers.put(element, c);
        }
        add((Component) c, BorderLayout.CENTER);
    }
}
 
开发者ID:botelhojp,项目名称:apache-jmeter-2.10,代码行数:27,代码来源:TestBeanGUI.java


示例3: getCustomizer

import java.beans.Customizer; //导入依赖的package包/类
@Override
public Customizer getCustomizer(String volumeType) {
    if (VOLUME_TYPES[0].equals(volumeType)||
        VOLUME_TYPES[1].equals(volumeType)||
        VOLUME_TYPES[2].equals(volumeType)) {
        return new J2SEVolumeCustomizer (volumeType);
    }
    else {
        return null;
    }
}
 
开发者ID:apache,项目名称:incubator-netbeans,代码行数:12,代码来源:J2SELibraryTypeProvider.java


示例4: initComponents

import java.beans.Customizer; //导入依赖的package包/类
private void initComponents () {
    this.getAccessibleContext().setAccessibleName (NbBundle.getMessage(J2SEPlatformCustomizer.class,"AN_J2SEPlatformCustomizer"));
    this.getAccessibleContext().setAccessibleDescription (NbBundle.getMessage(J2SEPlatformCustomizer.class,"AD_J2SEPlatformCustomizer"));
    this.addTab(NbBundle.getMessage(J2SEPlatformCustomizer.class,"TXT_Classes"), createPathTab(CLASSPATH));
    this.addTab(NbBundle.getMessage(J2SEPlatformCustomizer.class,"TXT_Sources"), createPathTab(SOURCES));
    this.addTab(NbBundle.getMessage(J2SEPlatformCustomizer.class,"TXT_Javadoc"), createPathTab(JAVADOC));
    final Lookup lkp = Lookups.forPath(CUSTOMIZERS_PATH);
    final boolean isDefaultPlatform = platform instanceof DefaultPlatformImpl;
    for (Lookup.Item<? extends Customizer> li : lkp.lookupResult(Customizer.class).allItems()) {
        final Customizer c = li.getInstance();
        if (!(c instanceof Component)) {
            continue;
        }
        String name = li.getId();
        final FileObject fo = FileUtil.getConfigFile(String.format("%s.instance",name));    //NOI18N
        if (fo != null) {
            try {
                name = fo.getFileSystem().getDecorator().annotateName(fo.getName(), Collections.<FileObject>singleton(fo));
            } catch (FileStateInvalidException ex) {
                name = fo.getName();
            }
            if (isDefaultPlatform &&
                fo.getAttribute(SUPPORTS_DEFAULT_PLATFORM) == Boolean.FALSE) {
                continue;
            }
        }
        c.setObject(platform);
        this.addTab(name, (Component)c);
    }
}
 
开发者ID:apache,项目名称:incubator-netbeans,代码行数:31,代码来源:J2SEPlatformCustomizer.java


示例5: remove

import java.beans.Customizer; //导入依赖的package包/类
private void remove(JPDAThread t) {
    ((Customizer) t).removePropertyChangeListener(this);
    //System.err.println("AllThreadsAnnotator("+Integer.toHexString(debugger.hashCode())+").remove("+t+")");
    synchronized (this) {
        Object annotation = threadAnnotations.remove(t);
        if (annotation != null) {
            threadsToAnnotate.remove(t);
            annotationsToRemove.add(annotation);
            task.schedule(ANNOTATION_SCHEDULE_TIME);
        }
    }
}
 
开发者ID:apache,项目名称:incubator-netbeans,代码行数:13,代码来源:CurrentThreadAnnotationListener.java


示例6: propertyChange

import java.beans.Customizer; //导入依赖的package包/类
@Override
public void propertyChange(PropertyChangeEvent evt) {
    synchronized (this) {
        if (!active) {
            ((Customizer) evt.getSource()).removePropertyChangeListener(this);
            return ;
        }
    }
    JPDAThread t = (JPDAThread) evt.getSource();
    annotate(t);
}
 
开发者ID:apache,项目名称:incubator-netbeans,代码行数:12,代码来源:CurrentThreadAnnotationListener.java


示例7: destroyThreadStateListeners

import java.beans.Customizer; //导入依赖的package包/类
private void destroyThreadStateListeners() {
    synchronized (threadStateListeners) {
        for (Map.Entry<JPDAThread, ThreadStateListener> entry : threadStateListeners.entrySet()) {
            PropertyChangeListener pcl = entry.getValue().getThreadPropertyChangeListener();
            ((Customizer) entry.getKey()).removePropertyChangeListener(pcl);
        }
        threadStateListeners.clear();
    }
}
 
开发者ID:apache,项目名称:incubator-netbeans,代码行数:10,代码来源:DebuggingTreeModel.java


示例8: getChildren

import java.beans.Customizer; //导入依赖的package包/类
public Object[] getChildren (Object o, int from, int to) 
throws UnknownTypeException {
    Object[] ch = getChildrenImpl(o, from, to);
    for (int i = 0; i < ch.length; i++) {
        if (ch[i] instanceof Customizer) {
            ((Customizer) ch[i]).addPropertyChangeListener(this);
        }
    }
    return ch;
}
 
开发者ID:apache,项目名称:incubator-netbeans,代码行数:11,代码来源:LocalsTreeModel.java


示例9: getCustomizer

import java.beans.Customizer; //导入依赖的package包/类
private Customizer getCustomizer(Breakpoint b) {
    Class cc = getCustomizerClass(b);
    if (cc == null) return null;
    try {
        Customizer c = (Customizer) cc.newInstance();
        c.setObject(b);
        return c;
    } catch (Exception ex) {
        Exceptions.printStackTrace(ex);
        return null;
    }
}
 
开发者ID:apache,项目名称:incubator-netbeans,代码行数:13,代码来源:BreakpointCustomizeAction.java


示例10: DeadlockDetectorImpl

import java.beans.Customizer; //导入依赖的package包/类
DeadlockDetectorImpl(JPDADebugger debugger) {
    debugger.addPropertyChangeListener(this);
    List<JPDAThread> threads = debugger.getThreadsCollector().getAllThreads();
    for (JPDAThread thread : threads) {
        ((Customizer) thread).addPropertyChangeListener(WeakListeners.propertyChange(this, thread));
        if (thread.isSuspended()) {
            synchronized (suspendedThreads) {
                suspendedThreads.add(thread);
            }
        }
    }
}
 
开发者ID:apache,项目名称:incubator-netbeans,代码行数:13,代码来源:DeadlockDetectorImpl.java


示例11: popupCustomizer

import java.beans.Customizer; //导入依赖的package包/类
/**
 * Popup the customizer for this bean
 * 
 * @param custClass the class of the customizer
 * @param bc the bean to be customized
 */
private void popupCustomizer(Class custClass, JComponent bc) {
  try {
    // instantiate
    final Object customizer = custClass.newInstance();
    // set environment **before** setting object!!
    if (customizer instanceof EnvironmentHandler) {
      ((EnvironmentHandler) customizer).setEnvironment(m_flowEnvironment);
    }
    ((Customizer) customizer).setObject(bc);
    final javax.swing.JFrame jf = new javax.swing.JFrame();
    jf.getContentPane().setLayout(new BorderLayout());
    jf.getContentPane().add((JComponent) customizer, BorderLayout.CENTER);
    if (customizer instanceof CustomizerCloseRequester) {
      ((CustomizerCloseRequester) customizer).setParentFrame(jf);
    }
    jf.addWindowListener(new java.awt.event.WindowAdapter() {
      @Override
      public void windowClosing(java.awt.event.WindowEvent e) {
        if (customizer instanceof CustomizerClosingListener) {
          ((CustomizerClosingListener) customizer).customizerClosing();
        }
        jf.dispose();
      }
    });
    jf.pack();
    jf.setVisible(true);
  } catch (Exception ex) {
    ex.printStackTrace();
  }
}
 
开发者ID:williamClanton,项目名称:jbossBA,代码行数:37,代码来源:KnowledgeFlowApp.java


示例12: add

import java.beans.Customizer; //导入依赖的package包/类
private void add(JPDAThread t) {
    ((Customizer) t).addPropertyChangeListener(this);
    //System.err.println("AllThreadsAnnotator("+Integer.toHexString(debugger.hashCode())+").add("+t+")");
    annotate(t);
}
 
开发者ID:apache,项目名称:incubator-netbeans,代码行数:6,代码来源:CurrentThreadAnnotationListener.java


示例13: ThreadStateUpdater

import java.beans.Customizer; //导入依赖的package包/类
public ThreadStateUpdater(JPDAThread t) {
    this.tr = new WeakReference(t);
    ((Customizer) t).addPropertyChangeListener(WeakListeners.propertyChange(this, t));
}
 
开发者ID:apache,项目名称:incubator-netbeans,代码行数:5,代码来源:DebuggingNodeModel.java


示例14: ThreadStateListener

import java.beans.Customizer; //导入依赖的package包/类
public ThreadStateListener(JPDAThread t) {
    this.tr = new WeakReference(t);
    this.propertyChangeListener = WeakListeners.propertyChange(this, t);
    ((Customizer) t).addPropertyChangeListener(propertyChangeListener);
}
 
开发者ID:apache,项目名称:incubator-netbeans,代码行数:6,代码来源:DebuggingTreeModel.java


示例15: selectLibrary

import java.beans.Customizer; //导入依赖的package包/类
private void selectLibrary (Node[] nodes) {
    int tabCount = this.properties.getTabCount();
    for (int i=0; i<tabCount; i++) {
        this.properties.removeTabAt(0);
    }
    this.libraryName.setEnabled(false);
    this.libraryName.setText("");   //NOI18N
    this.jLabel1.setVisible(false);
    this.libraryName.setVisible(false);
    this.properties.setVisible(false);
    this.deleteButton.setEnabled(false);
    if (nodes.length != 1) {
        return;
    }
    LibraryImplementation impl = nodes[0].getLookup().lookup(LibraryImplementation.class);
    if (impl == null) {
        return;
    }
    this.jLabel1.setVisible(true);
    this.libraryName.setVisible(true);
    this.properties.setVisible(true);
    boolean editable = model.isLibraryEditable (impl);
    this.libraryName.setEnabled(editable && LibrariesSupport.supportsDisplayName(impl));
    this.deleteButton.setEnabled(editable);
    this.libraryName.setText (LibrariesSupport.getLocalizedName(impl));
    LibraryTypeProvider provider = nodes[0].getLookup().lookup(LibraryTypeProvider.class);
    if (provider == null) {
        return;
    }
    LibraryCustomizerContextWrapper customizerContext;
    LibraryStorageArea area = nodes[0].getLookup().lookup(LibraryStorageArea.class);
    if (area != LibraryStorageArea.GLOBAL) {
        customizerContext = new LibraryCustomizerContextWrapper(impl, area);
        File f = Utilities.toFile(URI.create(area.getLocation().toExternalForm()));
        this.libraryLocation.setText(f.getPath());
    } else {
        customizerContext = new LibraryCustomizerContextWrapper(impl, null);
        this.libraryLocation.setText(LABEL_Global_Libraries());
    }

    String[] volumeTypes = provider.getSupportedVolumeTypes();
    for (int i=0; i< volumeTypes.length; i++) {
        Customizer c = provider.getCustomizer (volumeTypes[i]);
        if (c instanceof JComponent) {
            c.setObject (customizerContext);
            JComponent component = (JComponent) c;
            component.setEnabled (editable);
            String tabName = component.getName();
            if (tabName == null) {
                tabName = volumeTypes[i];
            }
            this.properties.addTab(tabName, component);
        }
    }        
}
 
开发者ID:apache,项目名称:incubator-netbeans,代码行数:56,代码来源:LibrariesCustomizer.java


示例16: getCustomizer

import java.beans.Customizer; //导入依赖的package包/类
public @Override Customizer getCustomizer(String volumeType) {
    return null;
}
 
开发者ID:apache,项目名称:incubator-netbeans,代码行数:4,代码来源:CPExtenderTest.java


示例17: JSWatchVar

import java.beans.Customizer; //导入依赖的package包/类
JSWatchVar(JPDADebugger debugger, JPDAWatch watch) {
    this.debugger = debugger;
    this.watch = watch;
    //((Refreshable) watch).isCurrent();
    ((Customizer) watch).addPropertyChangeListener(this);
}
 
开发者ID:apache,项目名称:incubator-netbeans,代码行数:7,代码来源:JSWatchVar.java


示例18: getCustomizer

import java.beans.Customizer; //导入依赖的package包/类
@Override
public Customizer getCustomizer(String volumeType) {
    return null;
}
 
开发者ID:apache,项目名称:incubator-netbeans,代码行数:5,代码来源:J2SEProjectGeneratorTest.java


示例19: addAsCustomizers

import java.beans.Customizer; //导入依赖的package包/类
private static void addAsCustomizers(List<Customizer> modelListCustomizerLists, Object[] modelLists) {
    for (int i = 0; i < modelLists.length; i++) {
        modelListCustomizerLists.add((Customizer) modelLists[i]);
    }
}
 
开发者ID:apache,项目名称:incubator-netbeans,代码行数:6,代码来源:ViewModelListener.java


示例20: setUp

import java.beans.Customizer; //导入依赖的package包/类
private synchronized void setUp() {
    clear();
    List<? extends T> list1 = l1.lookup(folder, service);
    List<? extends T> list2 = l2.lookup(folder, service);
    if (list1 instanceof PositionedList || list2 instanceof PositionedList) {
        List<PositionedElement> positioned = new ArrayList<PositionedElement>();
        List<T> others = new ArrayList<T>();
        boolean hp1 = false;
        if (list1 instanceof PositionedList) {
            PositionedList<? extends T> ml1 = (PositionedList<? extends T>) list1;
            if (ml1.hasPositions()) {
                fillElements(ml1, positioned, others);
                hp1 = true;
            }
        }
        boolean hp2 = false;
        if (list2 instanceof PositionedList) {
            PositionedList<? extends T> ml2 = (PositionedList<? extends T>) list2;
            if (ml2.hasPositions()) {
                fillElements(ml2, positioned, others);
                hp2 = true;
            }
        }
        if (hp1 && hp2) { // merge
            if (!positioned.isEmpty()) {
                Collections.sort(positioned);
                Set<String> hiddenClassNames = new HashSet<String>();
                addHiddenClassNames(list1, hiddenClassNames);
                addHiddenClassNames(list2, hiddenClassNames);
                List<T> sorted = new LookupList<T>(hiddenClassNames);
                for (PositionedElement<T> pe : positioned) {
                    sorted.add(pe.element);
                }
                positionedElements = positioned;
                list1 = sorted;
            } else {
                list1 = Collections.emptyList();
            }
            list2 = others;
        } else if (hp1) {
            positionedElements = positioned;
        } else if (hp2) {
            positionedElements = positioned;
            List<? extends T> switchList = list1;
            list1 = list2;
            list2 = switchList;
        }
    }
    addAll (list1);
    addAll (list2);
    sublist1 = (list1 instanceof Customizer) ? (Customizer) list1 : null;
    sublist2 = (list2 instanceof Customizer) ? (Customizer) list2 : null;
}
 
开发者ID:apache,项目名称:incubator-netbeans,代码行数:54,代码来源:Lookup.java



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


鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
Java Query类代码示例发布时间:2022-05-21
下一篇:
Java MethodCall类代码示例发布时间:2022-05-21
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap