本文整理汇总了Java中org.netbeans.api.visual.action.ActionFactory类的典型用法代码示例。如果您正苦于以下问题:Java ActionFactory类的具体用法?Java ActionFactory怎么用?Java ActionFactory使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
ActionFactory类属于org.netbeans.api.visual.action包,在下文中一共展示了ActionFactory类的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的Java代码示例。
示例1: VMDGraphScene
import org.netbeans.api.visual.action.ActionFactory; //导入依赖的package包/类
/**
* Creates a VMD graph scene with a specific color scheme.
* @param scheme the color scheme
*/
public VMDGraphScene (VMDColorScheme scheme) {
this.scheme = scheme;
setKeyEventProcessingType (EventProcessingType.FOCUSED_WIDGET_AND_ITS_PARENTS);
addChild (backgroundLayer);
addChild (mainLayer);
addChild (connectionLayer);
addChild (upperLayer);
router = RouterFactory.createOrthogonalSearchRouter (mainLayer, connectionLayer);
getActions ().addAction (ActionFactory.createZoomAction ());
getActions ().addAction (ActionFactory.createPanAction ());
getActions ().addAction (ActionFactory.createRectangularSelectAction (this, backgroundLayer));
sceneLayout = LayoutFactory.createSceneGraphLayout (this, new GridGraphLayout<String, String> ().setChecker (true));
}
开发者ID:apache,项目名称:incubator-netbeans,代码行数:22,代码来源:VMDGraphScene.java
示例2: TestScene
import org.netbeans.api.visual.action.ActionFactory; //导入依赖的package包/类
public TestScene() {
addChild(mainLayer);
addChild(connectionLayer);
addChild(interractionLayer);
getActions().addAction(createAction);
//mainLayer.addChild(new LabelWidget(this, "Click on background to create a node. Drag a node to create a connection."));
// do not change label nor location because it is hard coded in test cases
//addNode("Label 0").setPreferredLocation(new Point(100, 100));
Widget label0Widget = addNode("Label 0");
label0Widget.setPreferredLocation(new Point(100, 100));
label0Widget.getActions().addAction(ActionFactory.createPopupMenuAction(new MyPopupProvider()));
label0Widget.getActions().addAction(new LabelAction());
Widget label1Widget = addNode("Label 1");
label1Widget.setPreferredLocation(new Point(300, 100));
LabelWidget movableWidget = new LabelWidget(this, "Movable Widget");
movableWidget.setPreferredLocation(new Point(100, 150));
movableWidget.getActions().addAction(moveAction);
addChild(movableWidget);
}
开发者ID:apache,项目名称:incubator-netbeans,代码行数:20,代码来源:Utils.java
示例3: TLScene
import org.netbeans.api.visual.action.ActionFactory; //导入依赖的package包/类
public TLScene(TLDatabase db) {
LayoutFactory.SerialAlignment ALIGNMENT = LayoutFactory.SerialAlignment.LEFT_TOP;
Layout flowLayout = LayoutFactory.createVerticalFlowLayout(ALIGNMENT, 10);
getActions().addAction(ActionFactory.createPanAction());
// add main layer
this.mainLayer = new LayerWidget(this);
this.mainLayer.setLayout(flowLayout);
this.addChild(mainLayer);
// add overlay layer
this.overlayLayer = new LayerWidget(this);
this.addChild(overlayLayer);
// add CurrentTimeWidget to over
// currentTimeWidget = new CurrentTimeWidget(this, db);
// overlayLayer.addChild(currentTimeWidget);
// add widget showing ticks above
ticsWidgety = new TimeTicsWidget(this);
this.mainLayer.addChild(ticsWidgety);
}
开发者ID:kefik,项目名称:Pogamut3,代码行数:24,代码来源:TLScene.java
示例4: attachPresenterToWidget
import org.netbeans.api.visual.action.ActionFactory; //导入依赖的package包/类
/**
* Register widget as the moveable drag and drop plus register accept
* providers from presenter.
*
* @param <LAP_ELEMENT>
* @param widget widget that will be moveable and on whcih can be
* @param presenter presenter that is used to get accept actions for widget.
* @param element element that is used for drag and drop.
*/
private <LAP_ELEMENT extends PoshElement> void attachPresenterToWidget(ShedWidget widget, IPresenter presenter, LAP_ELEMENT element) {
WidgetAction editAction = presenter.getEditAction();
if (editAction != null) {
widget.getActions().addAction(editAction);
}
widget.getActions().addAction(ActionFactory.createMoveAction(
ActionFactory.createFreeMoveStrategy(),
new DragAndDropMoveProvider<LAP_ELEMENT>(lapScene, widget, element)));
AbstractAcceptAction[] acceptActions = presenter.getAcceptProviders();
if (acceptActions != null) {
for (AbstractAcceptAction acceptAction : acceptActions) {
widget.getActions().addAction(ActionFactory.createAcceptAction(acceptAction));
}
}
presenter.register();
}
开发者ID:kefik,项目名称:Pogamut3,代码行数:29,代码来源:ShedWidgetFactory.java
示例5: PoshScene
import org.netbeans.api.visual.action.ActionFactory; //导入依赖的package包/类
/**
* Create a new PoshScene, add default Pan and Zoom actions to the scene
*/
public PoshScene() {
this.setKeyEventProcessingType(EventProcessingType.FOCUSED_WIDGET_AND_ITS_CHILDREN);
getActions().addAction(ActionFactory.createPanAction());
getActions().addAction(ActionFactory.createZoomAction(1.25, false));
mainLayer = new LayerWidget(this);
this.addChild(mainLayer);
connectionLayer = new LayerWidget(this);
this.addChild(connectionLayer);
dndLayer = new LayerWidget(this);
this.addChild(dndLayer);
validate();
}
开发者ID:kefik,项目名称:Pogamut3,代码行数:21,代码来源:PoshScene.java
示例6: setRootWidget
import org.netbeans.api.visual.action.ActionFactory; //导入依赖的package包/类
/**
* Set root widget of the scene.
*
* TODO: maybe clearsubtree instead of just widget.
* @param node
*/
public void setRootWidget(PoshWidget<? extends PoshElement> node) {
this.connectionLayer.setVisible(true);
this.mainLayer.setVisible(true);
if (rootWidget != null) {
this.deletePoshWidget(rootWidget);
}
rootWidget = node;
// add menu
node.getActions().addAction(ActionFactory.createPopupMenuAction(node));
node.getActions().addAction(ActionFactory.createMoveAction(ActionFactory.createFreeMoveStrategy(), new DnDMoveProvider(this)));
mainLayer.addChild(node);
// validate scene
validate();
}
开发者ID:kefik,项目名称:Pogamut3,代码行数:24,代码来源:PoshScene.java
示例7: addPoshWidget
import org.netbeans.api.visual.action.ActionFactory; //导入依赖的package包/类
/**
* Add widget and its connection widget to the scene.
* Validate it afterwards, consolidate if parameter set.
*
* @param newWidget widget that is being added to the tree
* @param consolidate should the method automaticaly consolidate the tree?
*/
public void addPoshWidget(PoshWidget newWidget, boolean consolidate) {
// add menu provider
newWidget.getActions().addAction(ActionFactory.createPopupMenuAction(newWidget));
// Add DnD move provider so I can drag widget from one part of tree to another and drop it there
newWidget.getActions().addAction(ActionFactory.createMoveAction(ActionFactory.createFreeMoveStrategy(), new DnDMoveProvider(this)));
// add widget
mainLayer.addChild(newWidget);
connectionLayer.addChild(newWidget.getConnection());
this.validate();
if (consolidate) {
this.consolidate();
}
}
开发者ID:kefik,项目名称:Pogamut3,代码行数:24,代码来源:PoshScene.java
示例8: CfgScene
import org.netbeans.api.visual.action.ActionFactory; //导入依赖的package包/类
public CfgScene(final JScrollPane scrollPane, final ControlFlowGraph cfg) {
addChild(clusterLayer);
addChild(mainLayer);
addChild(interractionLayer);
addChild(connectionLayer);
this.scrollPane = scrollPane;
this.loadModel(new CfgEnv(cfg));
this.getInputBindings().setZoomActionModifiers(0);
this.getActions().addAction(ActionFactory.createMouseCenteredZoomAction(1.1));
this.getActions().addAction(ActionFactory.createPanAction());
this.getActions().addAction(ActionFactory.createRectangularSelectAction(
this.createSelectDecorator(this),
interractionLayer,
this.createRectangularSelectProvider()));
this.getActions().addAction(this.contextPopupAction);
this.addSceneListener(createSceneListener(this));
this.validate();
getPreferences().addPreferenceChangeListener(preferenceChangeListener);
this.loadDefaults();
}
开发者ID:arodchen,项目名称:MaxSim,代码行数:22,代码来源:CfgScene.java
示例9: LoopClusterWidget
import org.netbeans.api.visual.action.ActionFactory; //导入依赖的package包/类
public LoopClusterWidget(CfgScene scene, int loopdepth, final int loopindex) {
super(scene);
this.cfgscene = scene;
this.loopIndex = loopindex;
this.loopDepth = loopdepth;
this.setBorder(BorderFactory.createDashedBorder(color, DASHSIZE, DASHSIZE/2, true));
this.getActions().addAction(ActionFactory.createEditAction( new EditProvider() { //double click action
public void edit(Widget w) {
if(w instanceof LoopClusterWidget){
for(LoopInfo info : cfgscene.getCfgEnv().getLoopMap().values()){
if(info.getLoopIndex() == loopindex){
cfgscene.setNodeSelection(info.getMembers());
break;
}
}
}
}
}));
}
开发者ID:arodchen,项目名称:MaxSim,代码行数:21,代码来源:LoopClusterWidget.java
示例10: EdgeSwitchWidget
import org.netbeans.api.visual.action.ActionFactory; //导入依赖的package包/类
public EdgeSwitchWidget(final CfgScene scene, NodeWidget nodeWidget, boolean output) {
super(scene);
this.scene = scene;
this.output = output;
this.nodeWidget = nodeWidget;
this.getActions().addAction(ActionFactory.createSelectAction(selectProvider));
TwoStateHoverProvider ts = new TsHover(this);
WidgetAction wa = ActionFactory.createHoverAction(ts);
this.hoverAction = wa;
this.getActions().addAction(wa);
scene.getActions().addAction(wa);
this.setToolTipText(TT_HIDE_EDGES);
this.setForeground(color_enabled);
this.setState(ObjectState.createNormal());
}
开发者ID:arodchen,项目名称:MaxSim,代码行数:17,代码来源:EdgeSwitchWidget.java
示例11: ControlFlowScene
import org.netbeans.api.visual.action.ActionFactory; //导入依赖的package包/类
public ControlFlowScene() {
selection = new HashSet<BlockWidget>();
this.getInputBindings().setZoomActionModifiers(0);
this.setLayout(LayoutFactory.createAbsoluteLayout());
mainLayer = new LayerWidget(this);
this.addChild(mainLayer);
edgeLayer = new LayerWidget(this);
this.addChild(edgeLayer);
selectLayer = new LayerWidget(this);
this.addChild(selectLayer);
this.getActions().addAction(hoverAction);
this.getActions().addAction(selectAction);
this.getActions().addAction(ActionFactory.createRectangularSelectAction(this, selectLayer, this));
this.getActions().addAction(ActionFactory.createMouseCenteredZoomAction(1.1));
}
开发者ID:AdoptOpenJDK,项目名称:openjdk-jdk10,代码行数:21,代码来源:ControlFlowScene.java
示例12: setNodeWidgetAction
import org.netbeans.api.visual.action.ActionFactory; //导入依赖的package包/类
@Override
public void setNodeWidgetAction(final INodeWidget nodeWidget) {
WidgetAction selectAction = ActionFactory.createSelectAction(NODE_WIDGET_SELECT_PROVIDER);
WidgetAction moveAction = new MoveAction(nodeWidget, null, MOVE_PROVIDER_DEFAULT, ALIGNSTRATEGY_PROVIDER, ALIGNSTRATEGY_PROVIDER);
WidgetAction popupMenuAction = ActionFactory.createPopupMenuAction(nodeWidget.getPopupMenuProvider());
WidgetAction snapMoveAction = ActionFactory.createMoveAction(ActionFactory.createSnapToGridMoveStrategy(5, 5), null);
WidgetAction acceptAction = ActionFactory.createAcceptAction(new PinWidgetAcceptProvider(file.getModelerScene()));
WidgetAction.Chain selectActionTool = nodeWidget.createActions(DesignerTools.SELECT);
selectActionTool.addAction(selectAction);
// selectActionTool.addAction(NODE_DELETE_ACTION);
selectActionTool.addAction(moveAction);
selectActionTool.addAction(nodeWidget.getModelerScene().createWidgetHoverAction());
selectActionTool.addAction(acceptAction);
selectActionTool.addAction(popupMenuAction);
selectActionTool.addAction(snapMoveAction);
}
开发者ID:jeddict,项目名称:NBModeler,代码行数:18,代码来源:ModelerDiagramEngine.java
示例13: setEdgeWidgetAction
import org.netbeans.api.visual.action.ActionFactory; //导入依赖的package包/类
@Override
public void setEdgeWidgetAction(IEdgeWidget edgeWidget) {
WidgetAction.Chain actions = edgeWidget.getActions();
actions.addAction(ActionFactory.createAddRemoveControlPointAction());
if (edgeWidget instanceof PEdgeWidget) {
actions.addAction(ActionFactory.createMoveControlPointAction(ActionFactory.createFreeMoveControlPointProvider(), ConnectionWidget.RoutingPolicy.DISABLE_ROUTING_UNTIL_END_POINT_IS_MOVED));
} else {
actions.addAction(new MoveControlPointAction(new FreeMoveControlPointProvider(), null)); // Working
}
actions.addAction(file.getModelerScene().createWidgetHoverAction());
actions.addAction(ActionFactory.createSelectAction(EDGE_WIDGET_SELECT_PROVIDER));
actions.addAction(ActionFactory.createReconnectAction(ActionFactory.createDefaultReconnectDecorator(), new SequenceFlowReconnectProvider(file.getModelerScene())));
actions.addAction(ActionFactory.createPopupMenuAction(edgeWidget.getPopupMenuProvider()));
}
开发者ID:jeddict,项目名称:NBModeler,代码行数:17,代码来源:ModelerDiagramEngine.java
示例14: WorkspaceScene
import org.netbeans.api.visual.action.ActionFactory; //导入依赖的package包/类
/**
*
* @param ws
* @param file
*/
public WorkspaceScene(Workspace ws, WorkspaceFile file) {
this.file = file;
backgroundLayer = new LayerWidget(this);
addChild(backgroundLayer);
mainLayer = new LayerWidget(this);
addChild(mainLayer);
connectionLayer = new LayerWidget(this);
addChild(connectionLayer);
this.ws = ws;
load();
MyDropTargetListener dtl = new MyDropTargetListener();
if (this.getView() == null) {
this.createView();
}
DropTarget dt = new DropTarget(this.getView(), dtl);
dt.setDefaultActions(DnDConstants.ACTION_COPY);
dt.setActive(true);
buildToolbar();
getActions().addAction(ActionFactory.createZoomAction());
getActions().addAction(ActionFactory.createPanAction());
getActions().addAction(ActionFactory.createWheelPanAction());
getActions().addAction(ActionFactory.createRectangularSelectAction(this, backgroundLayer));
}
开发者ID:vlarin,项目名称:visualakka,代码行数:31,代码来源:WorkspaceScene.java
示例15: createComponents
import org.netbeans.api.visual.action.ActionFactory; //导入依赖的package包/类
private void createComponents() {
JScrollPane shapePane = new javax.swing.JScrollPane();
this.setLayout(new BorderLayout());
add(shapePane, java.awt.BorderLayout.CENTER);
this.glassPane = new GraphSceneGlassPane();
this.glassPane.setOpaque(false);
this.glassPane.getScene().setOpaque(true);
this.setOpaque(false);
this.glassPane.getScene().getActions().addAction(ActionFactory.createPopupMenuAction(new MyPopupProviderCompositionZone(this.glassPane)));
JComponent myView = this.glassPane.getView();
shapePane.setViewportView(myView);
// myView.setOpaque(true);
this.add(this.glassPane.getScene().createSatelliteView(), BorderLayout.WEST);
}
开发者ID:dbunibas,项目名称:spicy,代码行数:20,代码来源:CompositionTopComponent.java
示例16: creaCandidateCorrespondence
import org.netbeans.api.visual.action.ActionFactory; //导入依赖的package包/类
private void creaCandidateCorrespondence(ValueCorrespondence valueCorrespondence, MappingTask mappingTask) {
INode iNodeSource = finder.findNodeInSchema(valueCorrespondence.getSourcePaths().get(0), mappingTask.getSourceProxy());
VMDPinWidgetSource sourceWidget = (VMDPinWidgetSource) iNodeSource.getAnnotation(Costanti.PIN_WIDGET_TREE_SPICY);
INode iNodeTarget = finder.findNodeInSchema(valueCorrespondence.getTargetPath(), mappingTask.getTargetProxy());
VMDPinWidgetTarget targetWidget = (VMDPinWidgetTarget) iNodeTarget.getAnnotation(Costanti.PIN_WIDGET_TREE_SPICY);
ConnectionWidget connection = new ConnectionWidget(glassPane.getScene());
connection.setTargetAnchorShape(AnchorShape.TRIANGLE_FILLED);
connection.setSourceAnchor(AnchorFactory.createCenterAnchor(sourceWidget));
connection.setTargetAnchor(AnchorFactory.createRectangularAnchor(targetWidget));
Stroke stroke = Costanti.DASHED_STROKE;
connection.setStroke(stroke);
ConnectionInfo connectionInfo = new ConnectionInfo();
connectionInfo.setConnectionWidget(connection);
connectionInfo.setValueCorrespondence(valueCorrespondence);
connection.setToolTipText(connectionInfo.getValueCorrespondence().toString());
setColorOnConfidence(connectionInfo, connection);
glassPane.getConnectionLayer().addChild(connection, connectionInfo);
connection.getActions().addAction(ActionFactory.createPopupMenuAction(new MyPopupProviderConnectionSpicy(glassPane.getScene())));
connection.getActions().addAction(ActionFactory.createSelectAction(new MySelectConnectionActionProvider(glassPane.getConnectionLayer())));
glassPane.getScene().validate();
}
开发者ID:dbunibas,项目名称:spicy,代码行数:23,代码来源:CreaWidgetCorrespondencesSpicy.java
示例17: creaCorrespondence
import org.netbeans.api.visual.action.ActionFactory; //导入依赖的package包/类
private void creaCorrespondence(VariableCorrespondence variableCorrespondence, ValueCorrespondence valueCorrespondence, MappingTask mappingTask) {
INode iNodeSource = finder.findNodeInSchema(valueCorrespondence.getSourcePaths().get(0), mappingTask.getSourceProxy());
VMDPinWidgetSource sourceWidget = (VMDPinWidgetSource) iNodeSource.getAnnotation(Costanti.PIN_WIDGET_TREE);
INode iNodeTarget = finder.findNodeInSchema(valueCorrespondence.getTargetPath(), mappingTask.getTargetProxy());
VMDPinWidgetTarget targetWidget = (VMDPinWidgetTarget) iNodeTarget.getAnnotation(Costanti.PIN_WIDGET_TREE);
ConnectionWidget connection = new ConnectionWidget(glassPane.getScene());
connection.setTargetAnchorShape(AnchorShape.TRIANGLE_FILLED);
connection.setSourceAnchor(AnchorFactory.createCenterAnchor(sourceWidget));
connection.setTargetAnchor(AnchorFactory.createRectangularAnchor(targetWidget));
Stroke stroke = Costanti.BASIC_STROKE;
connection.setStroke(stroke);
ConnectionInfo connectionInfo = new ConnectionInfo();
connectionInfo.setConnectionWidget(connection);
connectionInfo.setValueCorrespondence(valueCorrespondence);
connection.setToolTipText(connectionInfo.getValueCorrespondence().toString());
glassPane.getConnectionLayer().addChild(connection, connectionInfo);
connection.getActions().addAction(ActionFactory.createPopupMenuAction(new MyPopupProviderConnectionMappingTask(glassPane.getScene())));
connection.getActions().addAction(ActionFactory.createSelectAction(new MySelectConnectionActionProvider(glassPane.getConnectionLayer())));
// analisiFiltro.creaWidgetEsisteFiltro(connection, connectionInfo);
glassPane.getScene().validate();
}
开发者ID:dbunibas,项目名称:spicy,代码行数:23,代码来源:CreaWidgetCorrespondencesMappingTask.java
示例18: createConnection
import org.netbeans.api.visual.action.ActionFactory; //导入依赖的package包/类
public void createConnection(Widget sourceWidget, Widget targetWidget) {
try {
ConnectionWidget connection = new ConnectionWidget(sourceWidget.getScene());
connection.setTargetAnchorShape(AnchorShape.TRIANGLE_FILLED);
connection.setSourceAnchor(AnchorFactory.createRectangularAnchor(sourceWidget));
connection.setTargetAnchor(AnchorFactory.createRectangularAnchor(targetWidget));
Stroke stroke = Costanti.BASIC_STROKE;
connection.setStroke(stroke);
connection.getActions().addAction(ActionFactory.createPopupMenuAction(new MyPopupProviderConnectionConst(sourceWidget.getScene(), caratteristicheWidget)));
ConnectionInfo connectionInfo = new ConnectionInfo();
connectionInfo.setTargetWidget(targetWidget);
connectionInfo.setConnectionWidget(connection);
caratteristicheWidget.setFormValidation(new FormValidation(false));
creator.createCorrespondenceWithSourceValue(mainLayer, sourceWidget, targetWidget, connectionInfo);
caratteristicheWidget.addConnectionInfo(connectionInfo);
connectionLayer.addChild(connection, connectionInfo);
} catch (ExpressionSyntaxException ese) {
DialogDisplayer.getDefault().notify(new NotifyDescriptor.Message(NbBundle.getMessage(Costanti.class, Costanti.SYNTAX_WARNING) + " : " + ese, DialogDescriptor.WARNING_MESSAGE));
StatusDisplayer.getDefault().setStatusText(NbBundle.getMessage(Costanti.class, Costanti.SYNTAX_WARNING));
}
}
开发者ID:dbunibas,项目名称:spicy,代码行数:25,代码来源:ActionConstantConnection.java
示例19: createConnection
import org.netbeans.api.visual.action.ActionFactory; //导入依赖的package包/类
public void createConnection(Widget sourceWidget, Widget targetWidget) {
try {
ConnectionWidget connection = new ConnectionWidget(sourceWidget.getScene());
connection.setTargetAnchorShape(AnchorShape.TRIANGLE_FILLED);
connection.setSourceAnchor(AnchorFactory.createRectangularAnchor(sourceWidget));
connection.setTargetAnchor(AnchorFactory.createRectangularAnchor(targetWidget));
Stroke stroke = Costanti.BASIC_STROKE;
connection.setStroke(stroke);
connection.getActions().addAction(ActionFactory.createPopupMenuAction(new MyPopupProviderConnectionFunctionalDep(sourceWidget.getScene(), mainLayer, caratteristiche)));
ConnectionInfo connectionInfo = new ConnectionInfo();
connectionInfo.setTargetWidget(targetWidget);
connectionInfo.setConnectionWidget(connection);
if (!caratteristiche.getTargetList().isEmpty()) {
review.removeFunctionalDependency(caratteristiche.getFunctionalDependency(), caratteristiche.isSource());
}
caratteristiche.addTargetWidget((VMDPinWidget) targetWidget);
creator.createCorrespondenceWithFunctionalDep(mainLayer, caratteristiche, connectionInfo);
caratteristiche.setConnectionInfo(connectionInfo);
connectionLayer.addChild(connection, connectionInfo);
} catch (ExpressionSyntaxException e) {
DialogDisplayer.getDefault().notify(new NotifyDescriptor.Message(NbBundle.getMessage(Costanti.class, Costanti.SYNTAX_WARNING) + " : " + e.getMessage(), DialogDescriptor.WARNING_MESSAGE));
}
}
开发者ID:dbunibas,项目名称:spicy,代码行数:26,代码来源:ActionFunctionalDepConnection.java
示例20: showSliderImpl
import org.netbeans.api.visual.action.ActionFactory; //导入依赖的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
注:本文中的org.netbeans.api.visual.action.ActionFactory类示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 |
请发表评论