Package org.springframework.richclient.list

Examples of org.springframework.richclient.list.ListSingleSelectionGuard


        });

        widget.getTable().addMouseListener(new PopupMenuMouseListener(popupMenu));

        ValueModel selectionHolder = new ListSelectionValueModelAdapter(widget.getTable().getSelectionModel());
        new ListSingleSelectionGuard(selectionHolder, deleteExecutor);
        new ListSingleSelectionGuard(selectionHolder, propertiesExecutor);

        JPanel view = new JPanel(new BorderLayout());
        view.add(widget.getTextFilterField(), BorderLayout.NORTH);
        view.add(table, BorderLayout.CENTER);
        return view;
View Full Code Here


            // (held within a ValueModel) and then either enabling or disabling the
            // guarded object (our executors) based on the configured criteria.
            // This configuration greatly simplifies the interaction between commands
            // that require a selection on which to operate.
            ValueModel selectionHolder = new ListSelectionValueModelAdapter(contactTable.getSelectionModel());
            new ListSingleSelectionGuard(selectionHolder, deleteExecutor);
            new ListSingleSelectionGuard(selectionHolder, propertiesExecutor);

            return contactTable;
        }
View Full Code Here

      @NotNull
      public Collection<? extends ActionCommand> getCommands( @NotNull ValueModel selectionHolder ) {
        ObjectTable<T> objectTable = panel.getObjectTable();

        //noinspection ResultOfObjectAllocationIgnored
        new ListSingleSelectionGuard( new ListSelectionValueModelAdapter( objectTable.getSelectionModel() ), editCommand );
        return Collections.singletonList( editCommand );
      }

      @Override
      public void registerLocalCommandExecutors( @NotNull PageComponentContext context ) {
View Full Code Here

    panel.addCommandProvider( new SidePanelCommandsProvider() {
      @Override
      @NotNull
      public Collection<? extends ActionCommand> getCommands( @NotNull ValueModel selectionHolder ) {
        //noinspection ResultOfObjectAllocationIgnored
        new ListSingleSelectionGuard( selectionHolder, command );
        return Arrays.asList( command );
      }

      @Override
      public void registerLocalCommandExecutors( @NotNull PageComponentContext context ) {
View Full Code Here

  @Override
  public void initialize() {
    ValueModel selectionHolder = new ListSelectionValueModelAdapter( listView.getTable().getSelectionModel() );

    //noinspection ResultOfObjectAllocationIgnored
    new ListSingleSelectionGuard( selectionHolder, deleteCommand );
    //noinspection ResultOfObjectAllocationIgnored
    new ListSingleSelectionGuard( selectionHolder, propertiesCommand );

    newCommand.setEnabled( true );
  }
View Full Code Here

TOP

Related Classes of org.springframework.richclient.list.ListSingleSelectionGuard

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.