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


Java ComponentWidget类代码示例

本文整理汇总了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;未经允许,请勿转载。