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

Java ComponentWidget类代码示例

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

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



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

示例1: showSliderImpl

import org.netbeans.api.visual.widget.ComponentWidget; //导入依赖的package包/类
private void showSliderImpl(LayerWidget constraintslayer, Point point) {

        ComponentWidget componentWidget = new ComponentWidget(scene, slider);

        componentWidget.getActions().addAction(ActionFactory.createMoveAction());

        CaratteristicheBarra caratteristicheBarra = new CaratteristicheBarra(componentWidget, Costanti.INTERMEDIE_BARRA);
        IconNodeWidget barra = new IconNodeWidget(scene);
        barra.setLayout(LayoutFactory.createHorizontalFlowLayout());
        barra.setImage(ImageUtilities.loadImage(Costanti.ICONA_MOVE));
        ComponentWidget labelConfidence = new ComponentWidget(scene, jLabelConfidenceLevel);
        labelConfidence.setPreferredSize(new Dimension(100, 10));
        barra.addChild(labelConfidence);
        Point pointBarra = new Point(point.x - Costanti.OFF_SET_X_WIDGET_BARRA, point.y - Costanti.OFF_SET_Y_WIDGET_BARRA);
        barra.setPreferredLocation(pointBarra);
        MyMoveProviderGeneric moveProvider = new MyMoveProviderGeneric();
        barra.getActions().addAction(ActionFactory.createMoveAction(moveProvider, moveProvider));

//        int x = myGraphScene.getBounds()
        componentWidget.setPreferredLocation(new Point(point.x, point.y));
        constraintslayer.addChild(componentWidget, barra);
        constraintslayer.addChild(barra, caratteristicheBarra);
        scene.validate();
        myGraphScene.updateUI();
    }
 
开发者ID:dbunibas,项目名称:spicy,代码行数:26,代码来源:MyPopupSceneMatcher.java


示例2: ShapeTopComponent

import org.netbeans.api.visual.widget.ComponentWidget; //导入依赖的package包/类
public ShapeTopComponent() {
    initComponents();
    setName(Bundle.CTL_ShapeTopComponent());
    setToolTipText(Bundle.HINT_ShapeTopComponent());

    setLayout(new BorderLayout());
    //GraphSceneImpl scene = new GraphSceneImpl();
    VMDGraphScene scene = new VMDGraphScene();
    JScrollPane shapePane = new JScrollPane();
    shapePane.setViewportView(scene.createView());
    add(shapePane, BorderLayout.CENTER);
    add(scene.createSatelliteView(), BorderLayout.WEST);
    
    //LineChartJFXPanel lineChartPanel = new LineChartJFXPanel();
    SwingInterop lineChartPanel = new SwingInterop();
    VMDNodeWidget widget = (VMDNodeWidget) scene.addNode("JavaFX Chart");
    ComponentWidget componentWidget = new ComponentWidget(scene, lineChartPanel);
    widget.addChild(componentWidget);
    
    //scene.getSceneAnimator().animatePreferredLocation(widget, getMousePosition(true));
    scene.validate();
    
    associateLookup(Lookups.singleton(PaletteSupport.createPalette()));
}
 
开发者ID:Alidron,项目名称:designer,代码行数:25,代码来源:ShapeTopComponent.java


示例3: findComponent

import org.netbeans.api.visual.widget.ComponentWidget; //导入依赖的package包/类
QBNodeComponent findComponent(Widget widget) {
List<Widget> widgets = widget.getChildren();
for (Widget w : widgets) {
    if (w instanceof ComponentWidget)
	return (QBNodeComponent)((ComponentWidget)w).getComponent();
}
return null;
   }
 
开发者ID:apache,项目名称:incubator-netbeans,代码行数:9,代码来源:QueryBuilderGraphFrame.java


示例4: showSlider

import org.netbeans.api.visual.widget.ComponentWidget; //导入依赖的package包/类
private void showSlider(LayerWidget constraLayerWidget) {
    ComponentWidget componentWidget = checkSliderShow(constraLayerWidget);
    if (componentWidget != null) {
        ((Widget) constraLayerWidget.getChildConstraint(componentWidget)).removeFromParent();
        componentWidget.removeFromParent();
        scene.validate();
    } else {
        showSliderImpl(constraLayerWidget, this.point);
    }

}
 
开发者ID:dbunibas,项目名称:spicy,代码行数:12,代码来源:MyPopupSceneMatcher.java


示例5: renderGraph

import org.netbeans.api.visual.widget.ComponentWidget; //导入依赖的package包/类
private void renderGraph() {
    System.out.println("Rendering state graph...");
    
    if (graph == null) {
        System.out.println("Cannot render graph. Graph is null.");
        return;
    }
    
    AppViewGrappaAdapter adapter = new AppViewGrappaAdapter();
    stateSelectedResult = adapter.getLookup().lookupResult(GrappaStateSelectedChangeEvent.class);
    stateSelectedResult.addLookupListener(this);
    
    GrappaPanel gp = new GrappaPanel(graph);
    gp.addGrappaListener(adapter);
    gp.setScaleToFit(false);
    
    if (graphScene != null) {
        graphScene.revalidate();
        graphScene.removeChildren();
        graphScene.revalidate();
        graphScene = null;
    }
    
    graphScene = new Scene();
    graphSceneScrollPane.setViewportView(graphScene.createView());
    graphScene.revalidate();
    
    ComponentWidget cw = new ComponentWidget(graphScene, gp);
    graphScene.addChild(cw);
    graphScene.revalidate();
    
    //the original scrollpane version
    //graphScrollPane.setViewportView(gp);
    
    System.out.println("Rendering graph file done.");
    
    // Add the scene to the lookup
    content.set(Arrays.asList(graphScene), null);
}
 
开发者ID:samini,项目名称:gort-public,代码行数:40,代码来源:AppViewCloneableTopComponent.java


示例6: createTextCompartment

import org.netbeans.api.visual.widget.ComponentWidget; //导入依赖的package包/类
private ComponentWidget createTextCompartment(Scene scene, String displayText, JTextArea textArea) {
  textArea.setText(displayText);
  ComponentWidget compartment = new ComponentWidget(scene, textArea);
  return compartment;
}
 
开发者ID:terraframe,项目名称:Runway-SDK,代码行数:6,代码来源:SchemaClassWidget.java



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


鲜花

握手

雷人

路过

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

请发表评论

全部评论

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

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

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

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

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