com.google.inject.assistedinject.Assisted Java Examples

The following examples show how to use com.google.inject.assistedinject.Assisted. You can vote up the ones you like or vote down the ones you don't like, and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example #1
Source File: LinkConnection.java    From openAGV with Apache License 2.0 6 votes vote down vote up
/**
 * Creates a new instance.
 *
 * @param model The model corresponding to this graphical object.
 * @param textGenerator The tool tip text generator.
 */
@Inject
public LinkConnection(@Assisted LinkModel model,
                      ToolTipTextGenerator textGenerator) {
  super(model);
  this.textGenerator = requireNonNull(textGenerator, "textGenerator");

  double[] dash = {5.0, 5.0};
  set(AttributeKeys.START_DECORATION, null);
  set(AttributeKeys.END_DECORATION, null);
  set(AttributeKeys.STROKE_WIDTH, 1.0);
  set(AttributeKeys.STROKE_CAP, BasicStroke.CAP_BUTT);
  set(AttributeKeys.STROKE_JOIN, BasicStroke.JOIN_MITER);
  set(AttributeKeys.STROKE_MITER_LIMIT, 1.0);
  set(AttributeKeys.STROKE_DASHES, dash);
  set(AttributeKeys.STROKE_DASH_PHASE, 0.0);
}
 
Example #2
Source File: DefaultVehicleController.java    From openAGV with Apache License 2.0 6 votes vote down vote up
/**
 * Creates a new instance associated with the given vehicle.
 *
 * @param vehicle The vehicle this vehicle controller will be associated with.
 * @param adapter The communication adapter of the associated vehicle.
 * @param kernel The kernel instance maintaining the model.
 * @param vehicleService The kernel's vehicle service.
 * @param notificationService The kernel's notification service.
 * @param dispatcherService The kernel's dispatcher service.
 * @param scheduler The scheduler managing resource allocations.
 * @param eventBus The event bus this instance should register with and send events to.
 */
@Inject
public DefaultVehicleController(@Assisted @Nonnull Vehicle vehicle,
                                @Assisted @Nonnull VehicleCommAdapter adapter,
                                @Nonnull LocalKernel kernel,
                                @Nonnull InternalVehicleService vehicleService,
                                @Nonnull NotificationService notificationService,
                                @Nonnull DispatcherService dispatcherService,
                                @Nonnull Scheduler scheduler,
                                @Nonnull @ApplicationEventBus EventBus eventBus) {
  this.vehicle = requireNonNull(vehicle, "vehicle");
  this.commAdapter = requireNonNull(adapter, "adapter");
  this.localKernel = requireNonNull(kernel, "kernel");
  this.vehicleService = requireNonNull(vehicleService, "vehicleService");
  this.notificationService = requireNonNull(notificationService, "notificationService");
  this.dispatcherService = requireNonNull(dispatcherService, "dispatcherService");
  this.scheduler = requireNonNull(scheduler, "scheduler");
  this.eventBus = requireNonNull(eventBus, "eventBus");
}
 
Example #3
Source File: VehicleFigure.java    From openAGV with Apache License 2.0 6 votes vote down vote up
/**
 * Creates a new instance.
 *
 * @param vehicleTheme The vehicle theme to be used.
 * @param menuFactory A factory for popup menus.
 * @param appConfig The application's configuration.
 * @param model The model corresponding to this graphical object.
 * @param textGenerator The tool tip text generator.
 * @param modelManager The model manager.
 * @param applicationState The application's current state.
 */
@Inject
public VehicleFigure(VehicleTheme vehicleTheme,
                     MenuFactory menuFactory,
                     PlantOverviewApplicationConfiguration appConfig,
                     @Assisted VehicleModel model,
                     ToolTipTextGenerator textGenerator,
                     ModelManager modelManager,
                     ApplicationState applicationState) {
  super(model);
  this.vehicleTheme = requireNonNull(vehicleTheme, "vehicleTheme");
  this.menuFactory = requireNonNull(menuFactory, "menuFactory");
  this.textGenerator = requireNonNull(textGenerator, "textGenerator");
  this.modelManager = requireNonNull(modelManager, "modelManager");
  this.applicationState = requireNonNull(applicationState, "applicationState");

  fDisplayBox = new Rectangle((int) LENGTH, (int) WIDTH);
  fZoomPoint = new ZoomPoint(0.5 * LENGTH, 0.5 * WIDTH);

  setIgnorePrecisePosition(appConfig.ignoreVehiclePrecisePosition());
  setIgnoreOrientationAngle(appConfig.ignoreVehicleOrientationAngle());

  fImage = vehicleTheme.statelessImage(model.getVehicle());
}
 
Example #4
Source File: WithdrawAction.java    From openAGV with Apache License 2.0 6 votes vote down vote up
/**
 * Creates a new instance.
 *
 * @param vehicles The selected vehicles.
 * @param immediateAbort Whether or not to abort immediately
 * @param portalProvider Provides access to a shared portal.
 * @param dialogParent The parent component for dialogs shown by this action.
 */
@Inject
public WithdrawAction(@Assisted Collection<VehicleModel> vehicles,
                      @Assisted boolean immediateAbort,
                      SharedKernelServicePortalProvider portalProvider,
                      @ApplicationFrame Component dialogParent) {
  this.vehicles = requireNonNull(vehicles, "vehicles");
  this.immediateAbort = requireNonNull(immediateAbort, "immediateAbort");
  this.portalProvider = requireNonNull(portalProvider, "portalProvider");
  this.dialogParent = requireNonNull(dialogParent, "dialogParent");

  if (immediateAbort) {
    putValue(NAME, BUNDLE.getString("withdrawAction.withdrawImmediately.name"));
  }
  else {
    putValue(NAME, BUNDLE.getString("withdrawAction.withdraw.name"));
  }

}
 
Example #5
Source File: PropertiesTableContent.java    From openAGV with Apache License 2.0 6 votes vote down vote up
/**
 * Creates a new instance.
 *
 * @param cellEditorFactory A factory for cell editors.
 * @param tableProvider Provides attribute tables.
 * @param tableModelProvider Provides attribute table models.
 * @param eventBus The application's event bus.
 * @param dialogParent A parent for dialogs created by this instance.
 * @param componentsFactory The components factory.
 */
@Inject
public PropertiesTableContent(CellEditorFactory cellEditorFactory,
                              Provider<AttributesTable> tableProvider,
                              Provider<AttributesTableModel> tableModelProvider,
                              @ApplicationEventBus EventBus eventBus,
                              @Assisted JPanel dialogParent,
                              PropertiesComponentsFactory componentsFactory) {
  super(tableProvider);
  this.cellEditorFactory = requireNonNull(cellEditorFactory,
                                          "cellEditorFactory");
  this.tableModelProvider = requireNonNull(tableModelProvider,
                                           "tableModelProvider");
  this.eventBus = requireNonNull(eventBus, "eventBus");
  this.dialogParent = requireNonNull(dialogParent, "dialogParent");
  this.componentsFactory = requireNonNull(componentsFactory, "componentsFactory");
}
 
Example #6
Source File: IntegrationLevelChangeAction.java    From openAGV with Apache License 2.0 6 votes vote down vote up
/**
 * Creates a new instance.
 *
 * @param vehicles The selected vehicles.
 * @param level The level to to change the vehicles to.
 * @param portalProvider Provides access to a shared portal.
 */
@Inject
public IntegrationLevelChangeAction(@Assisted Collection<VehicleModel> vehicles,
                                    @Assisted Vehicle.IntegrationLevel level,
                                    SharedKernelServicePortalProvider portalProvider) {
  this.vehicles = requireNonNull(vehicles, "vehicles");
  this.level = requireNonNull(level, "level");
  this.portalProvider = requireNonNull(portalProvider, "portalProvider");

  String actionName;
  switch (level) {
    case TO_BE_NOTICED:
      actionName = bundle.getString("integrationLevelChangeAction.notice.name");
      break;
    case TO_BE_RESPECTED:
      actionName = bundle.getString("integrationLevelChangeAction.respect.name");
      break;
    case TO_BE_UTILIZED:
      actionName = bundle.getString("integrationLevelChangeAction.utilize.name");
      break;
    default:
      actionName = bundle.getString("integrationLevelChangeAction.ignore.name");
      break;
  }
  putValue(NAME, actionName);
}
 
Example #7
Source File: ComplexPropertyCellEditor.java    From openAGV with Apache License 2.0 6 votes vote down vote up
/**
 * Creates a new instance.
 *
 * @param contentMap Provides the appropriate content for a given property.
 * @param dialogParent A parent for dialogs created by this instance.
 */
@Inject
public ComplexPropertyCellEditor(
    Map<Class<? extends AbstractComplexProperty>, Provider<DetailsDialogContent>> contentMap,
    @Assisted JPanel dialogParent) {
  this.contentMap = requireNonNull(contentMap, "contentMap");
  this.dialogParent = requireNonNull(dialogParent, "dialogParent");

  fButton.setFont(new Font("Dialog", Font.PLAIN, 12));
  fButton.setBorder(null);
  fButton.setHorizontalAlignment(JButton.LEFT);
  fButton.addActionListener(new ActionListener() {
    @Override
    public void actionPerformed(ActionEvent e) {
      showDialog();
    }
  });
}
 
Example #8
Source File: MultipleSelectionTool.java    From openAGV with Apache License 2.0 6 votes vote down vote up
/**
 * Creates a new instance.
 *
 * @param appState Stores the application's current state.
 * @param menuFactory A factory for menu items in popup menus created by this
 * tool.
 * @param selectAreaTracker The tracker to be used for area selections in the
 * drawing.
 * @param dragTracker The tracker to be used for dragging figures.
 * @param drawingActions Drawing-related actions for the popup menus created
 * by this tool.
 * @param selectionActions Selection-related actions for the popup menus
 * created by this tool.
 */
@Inject
public MultipleSelectionTool(ApplicationState appState,
                             MenuFactory menuFactory,
                             SelectAreaTracker selectAreaTracker,
                             DragTracker dragTracker,
                             @Assisted("drawingActions") Collection<Action> drawingActions,
                             @Assisted("selectionActions") Collection<Action> selectionActions) {
  super(drawingActions, selectionActions);
  this.appState = requireNonNull(appState, "appState");
  this.menuFactory = requireNonNull(menuFactory, "menuFactory");
  requireNonNull(selectAreaTracker, "selectAreaTracker");
  requireNonNull(dragTracker, "dragTracker");
  this.drawingActions = requireNonNull(drawingActions, "drawingActions");
  this.selectionActions = requireNonNull(selectionActions, "selectionActions");

  setSelectAreaTracker(selectAreaTracker);
  setDragTracker(dragTracker);
}
 
Example #9
Source File: ModelToLayoutMenuItem.java    From openAGV with Apache License 2.0 6 votes vote down vote up
/**
 * Creates a new instance.
 *
 * @param drawingEditor A <code>DrawingEditor</code> instance.
 * @param undoRedoManager The application's undo/redo manager.
 * @param eventHandler Where this instance sends events.
 * @param componentsFactory The components factory.
 * @param copyAll Indicates whether the values of ALL points and locations
 * shall be copied when the menu item is clicked. If false only the selected
 * figures will be considered.
 */
@Inject
public ModelToLayoutMenuItem(OpenTCSDrawingEditor drawingEditor,
                             UndoRedoManager undoRedoManager,
                             @ApplicationEventBus EventHandler eventHandler,
                             PropertiesComponentsFactory componentsFactory,
                             @Assisted boolean copyAll) {
  super(ResourceBundleUtil.getBundle(I18nPlantOverview.MENU_PATH).getString("modelToLayoutMenuItem.text"));
  this.drawingEditor = requireNonNull(drawingEditor, "drawingEditor");
  this.undoRedoManager = requireNonNull(undoRedoManager, "undoRedoManager");
  this.eventBus = requireNonNull(eventHandler, "eventHandler");
  this.componentsFactory = requireNonNull(componentsFactory, "componentsFactory");
  this.copyAll = copyAll;

  setIcon(new ImageIcon(
      getClass().getClassLoader().getResource("org/opentcs/guing/res/symbols/menu/arrow-down-3.png")));
  setMargin(new Insets(0, 2, 0, 2));
  addActionListener();
}
 
Example #10
Source File: LayoutToModelMenuItem.java    From openAGV with Apache License 2.0 6 votes vote down vote up
/**
 * Creates a new instance.
 *
 * @param drawingEditor A <code>DrawingEditor</code> instance.
 * @param undoRedoManager The application's undo/redo manager.
 * @param eventHandler Where this instance sends events.
 * @param componentsFactory The components factory.
 * @param copyAll Indicates whether the values of ALL points and locations
 * shall be copied when the menu item is clicked. If false only the selected
 * figures will be considered.
 */
@Inject
public LayoutToModelMenuItem(OpenTCSDrawingEditor drawingEditor,
                             UndoRedoManager undoRedoManager,
                             @ApplicationEventBus EventHandler eventHandler,
                             PropertiesComponentsFactory componentsFactory,
                             @Assisted boolean copyAll) {
  super(ResourceBundleUtil.getBundle(I18nPlantOverview.MENU_PATH)
      .getString("layoutToModelMenuItem.text"));
  this.drawingEditor = requireNonNull(drawingEditor, "drawingEditor");
  this.undoRedoManager = requireNonNull(undoRedoManager, "undoRedoManager");
  this.eventHandler = requireNonNull(eventHandler, "eventHandler");
  this.componentsFactory = requireNonNull(componentsFactory, "componentsFactory");
  this.copyAll = copyAll;

  setIcon(new ImageIcon(
      getClass().getClassLoader().getResource("org/opentcs/guing/res/symbols/menu/arrow-up-3.png")));
  setMargin(new Insets(0, 2, 0, 2));
  addActionListener();
}
 
Example #11
Source File: NamedVehicleFigure.java    From openAGV with Apache License 2.0 6 votes vote down vote up
@Inject
public NamedVehicleFigure(VehicleTheme vehicleTheme,
                          MenuFactory menuFactory,
                          PlantOverviewApplicationConfiguration appConfig,
                          @Assisted VehicleModel model,
                          ToolTipTextGenerator textGenerator,
                          ModelManager modelManager,
                          ApplicationState applicationState) {
  super(vehicleTheme,
        menuFactory,
        appConfig,
        model,
        textGenerator,
        modelManager,
        applicationState);
}
 
Example #12
Source File: LoopbackCommAdapterPanel.java    From openAGV with Apache License 2.0 5 votes vote down vote up
/**
 * Creates new LoopbackCommunicationAdapterPanel.
 *
 * @param processModel The comm adapter's process model.
 * @param vehicleService The vehicle service.
 * @param callWrapper The call wrapper to use for service calls.
 */
@Inject
public LoopbackCommAdapterPanel(@Assisted LoopbackVehicleModelTO processModel,
                                @Assisted VehicleService vehicleService,
                                @ServiceCallWrapper CallWrapper callWrapper) {

  this.processModel = requireNonNull(processModel, "processModel");
  this.vehicleService = requireNonNull(vehicleService, "vehicleService");
  this.callWrapper = requireNonNull(callWrapper, "callWrapper");

  initComponents();
  initGuiContent();
}
 
Example #13
Source File: GCPRestorer.java    From cassandra-backup with Apache License 2.0 5 votes vote down vote up
@AssistedInject
public GCPRestorer(final GoogleStorageFactory storageFactory,
                   final ExecutorServiceSupplier executorServiceSupplier,
                   @Assisted final RestoreCommitLogsOperationRequest request) {
    super(request, executorServiceSupplier);
    this.storage = storageFactory.build(request);
}
 
Example #14
Source File: CoordinateCellEditor.java    From openAGV with Apache License 2.0 5 votes vote down vote up
/**
 * Creates a new instance.
 *
 * @param textField
 */
@Inject
public CoordinateCellEditor(@Assisted JTextField textField,
                            @Assisted UserMessageHelper umh,
                            PropertiesComponentsFactory componentsFactory) {
  super(textField, umh);
  this.componentsFactory = requireNonNull(componentsFactory, "componentsFactory");
}
 
Example #15
Source File: ControlCenterInfoHandler.java    From openAGV with Apache License 2.0 5 votes vote down vote up
/**
 * Creates a new ControlCenterInfoHandler.
 *
 * @param textArea The textArea we are writing to.
 * @param configuration This class' configuration.
 */
@Inject
public ControlCenterInfoHandler(@Assisted JTextArea textArea,
                                KernelControlCenterConfiguration configuration) {
  this.textArea = requireNonNull(textArea, "textArea");
  this.configuration = requireNonNull(configuration, "configuration");

  autoScroll = true;
}
 
Example #16
Source File: S3Backuper.java    From cassandra-backup with Apache License 2.0 5 votes vote down vote up
@AssistedInject
public S3Backuper(final TransferManagerFactory transferManagerFactory,
                  final ExecutorServiceSupplier executorSupplier,
                  @Assisted final BackupOperationRequest request) {
    super(request, executorSupplier);
    this.transferManager = transferManagerFactory.build(request);
}
 
Example #17
Source File: S3Backuper.java    From cassandra-backup with Apache License 2.0 5 votes vote down vote up
@AssistedInject
public S3Backuper(final TransferManagerFactory transferManagerFactory,
                  final ExecutorServiceSupplier executorServiceSupplier,
                  @Assisted final BackupCommitLogsOperationRequest request) {
    super(request, executorServiceSupplier);
    this.transferManager = transferManagerFactory.build(request);
}
 
Example #18
Source File: AzureBackuper.java    From cassandra-backup with Apache License 2.0 5 votes vote down vote up
@AssistedInject
public AzureBackuper(final CloudStorageAccountFactory cloudStorageAccountFactory,
                     final ExecutorServiceSupplier executorServiceSupplier,
                     @Assisted final BackupOperationRequest request) throws Exception {
    super(request, executorServiceSupplier);

    cloudStorageAccount = cloudStorageAccountFactory.build(request);
    cloudBlobClient = cloudStorageAccount.createCloudBlobClient();

    this.blobContainer = cloudBlobClient.getContainerReference(request.storageLocation.bucket);
}
 
Example #19
Source File: AzureBackuper.java    From cassandra-backup with Apache License 2.0 5 votes vote down vote up
@AssistedInject
public AzureBackuper(final CloudStorageAccountFactory cloudStorageAccountFactory,
                     final ExecutorServiceSupplier executorServiceSupplier,
                     @Assisted final BackupCommitLogsOperationRequest request) throws Exception {
    super(request, executorServiceSupplier);

    cloudStorageAccount = cloudStorageAccountFactory.build(request);
    cloudBlobClient = cloudStorageAccount.createCloudBlobClient();

    this.blobContainer = cloudBlobClient.getContainerReference(request.storageLocation.bucket);
}
 
Example #20
Source File: AzureRestorer.java    From cassandra-backup with Apache License 2.0 5 votes vote down vote up
@AssistedInject
public AzureRestorer(final CloudStorageAccountFactory cloudStorageAccountFactory,
                     final ExecutorServiceSupplier executorServiceSupplier,
                     @Assisted final RestoreOperationRequest request) throws Exception {
    super(request, executorServiceSupplier);

    cloudStorageAccount = cloudStorageAccountFactory.build(request);
    cloudBlobClient = cloudStorageAccount.createCloudBlobClient();

    this.blobContainer = cloudBlobClient.getContainerReference(request.storageLocation.bucket);
}
 
Example #21
Source File: AzureRestorer.java    From cassandra-backup with Apache License 2.0 5 votes vote down vote up
@AssistedInject
public AzureRestorer(final CloudStorageAccountFactory cloudStorageAccountFactory,
                     final ExecutorServiceSupplier executorServiceSupplier,
                     @Assisted final RestoreCommitLogsOperationRequest request) throws Exception {
    super(request, executorServiceSupplier);

    cloudStorageAccount = cloudStorageAccountFactory.build(request);
    cloudBlobClient = cloudStorageAccount.createCloudBlobClient();

    this.blobContainer = cloudBlobClient.getContainerReference(request.storageLocation.bucket);
}
 
Example #22
Source File: S3Restorer.java    From cassandra-backup with Apache License 2.0 5 votes vote down vote up
@AssistedInject
public S3Restorer(final TransferManagerFactory transferManagerFactory,
                  final ExecutorServiceSupplier executorServiceSupplier,
                  @Assisted final RestoreCommitLogsOperationRequest request) {
    super(request, executorServiceSupplier);
    this.transferManager = transferManagerFactory.build(request);
    this.amazonS3 = this.transferManager.getAmazonS3Client();
}
 
Example #23
Source File: LoopbackCommunicationAdapter.java    From openAGV with Apache License 2.0 5 votes vote down vote up
/**
 * Creates a new instance.
 *
 * @param componentsFactory The factory providing additional components for this adapter.
 * @param configuration This class's configuration.
 * @param vehicle The vehicle this adapter is associated with.
 * @param kernelExecutor The kernel's executor.
 */
@Inject
public LoopbackCommunicationAdapter(LoopbackAdapterComponentsFactory componentsFactory,
                                    VirtualVehicleConfiguration configuration,
                                    @Assisted Vehicle vehicle,
                                    @KernelExecutor ExecutorService kernelExecutor) {
  super(new LoopbackVehicleModel(vehicle),
        configuration.commandQueueCapacity(),
        1,
        configuration.rechargeOperation());
  this.vehicle = requireNonNull(vehicle, "vehicle");
  this.configuration = requireNonNull(configuration, "configuration");
  this.componentsFactory = requireNonNull(componentsFactory, "componentsFactory");
  this.kernelExecutor = requireNonNull(kernelExecutor, "kernelExecutor");
}
 
Example #24
Source File: ControlCenterInfoHandler.java    From openAGV with Apache License 2.0 5 votes vote down vote up
/**
 * Creates a new ControlCenterInfoHandler.
 *
 * @param textArea The textArea we are writing to.
 * @param configuration This class' configuration.
 */
@Inject
public ControlCenterInfoHandler(@Assisted JTextArea textArea,
                                ControlCenterConfiguration configuration) {
  this.textArea = requireNonNull(textArea, "textArea");
  this.configuration = requireNonNull(configuration, "configuration");

  autoScroll = true;
}
 
Example #25
Source File: GCPBackuper.java    From cassandra-backup with Apache License 2.0 5 votes vote down vote up
@AssistedInject
public GCPBackuper(final GoogleStorageFactory storageFactory,
                   final ExecutorServiceSupplier executorServiceSupplier,
                   @Assisted final BackupOperationRequest backupOperationRequest) {
    super(backupOperationRequest, executorServiceSupplier);
    this.storage = storageFactory.build(backupOperationRequest);
}
 
Example #26
Source File: LabeledLocationFigure.java    From openAGV with Apache License 2.0 5 votes vote down vote up
/**
 * Creates a new instance.
 *
 * @param figure The presentation figure.
 * @param textGenerator The tool tip text generator.
 */
@Inject
public LabeledLocationFigure(@Assisted LocationFigure figure,
                             ToolTipTextGenerator textGenerator) {
  requireNonNull(figure, "figure");
  this.textGenerator = requireNonNull(textGenerator, "textGenerator");

  setPresentationFigure(figure);
}
 
Example #27
Source File: PathConnection.java    From openAGV with Apache License 2.0 5 votes vote down vote up
/**
 * Creates a new instance.
 *
 * @param model The model corresponding to this graphical object.
 * @param textGenerator The tool tip text generator.
 */
@Inject
public PathConnection(@Assisted PathModel model,
                      ToolTipTextGenerator textGenerator) {
  super(model);
  this.textGenerator = requireNonNull(textGenerator, "textGenerator");
  resetPath();
}
 
Example #28
Source File: LocationFigure.java    From openAGV with Apache License 2.0 5 votes vote down vote up
/**
 * Creates a new instance.
 *
 * @param locationTheme The location theme to be used.
 * @param model The model corresponding to this graphical object.
 */
@Inject
public LocationFigure(LocationTheme locationTheme,
                      @Assisted LocationModel model) {
  super(model);
  this.locationTheme = requireNonNull(locationTheme, "locationTheme");

  fWidth = 30;
  fHeight = 30;
  fDisplayBox = new Rectangle(fWidth, fHeight);
  fZoomPoint = new ZoomPoint(0.5 * fWidth, 0.5 * fHeight);
}
 
Example #29
Source File: PointFigure.java    From openAGV with Apache License 2.0 5 votes vote down vote up
/**
 * Creates a new instance.
 *
 * @param model The model corresponding to this graphical object.
 */
@Inject
public PointFigure(@Assisted PointModel model) {
  super(model);

  // TO DO: Grid Constrainer anpassen, sodass auch kleinere Figur auf das "10er" Raster gezogen wird.
  fDiameter = 10;
  fDisplayBox = new Rectangle(fDiameter, fDiameter);
  fZoomPoint = new ZoomPoint(0.5 * fDiameter, 0.5 * fDiameter);
}
 
Example #30
Source File: LabeledPointFigure.java    From openAGV with Apache License 2.0 5 votes vote down vote up
/**
 * Creates a new instance.
 *
 * @param figure The presentation figure.
 * @param textGenerator The tool tip text generator.
 */
@Inject
public LabeledPointFigure(@Assisted PointFigure figure,
                          ToolTipTextGenerator textGenerator) {
  requireNonNull(figure, "figure");
  this.textGenerator = requireNonNull(textGenerator, "textGenerator");

  setPresentationFigure(figure);
}