Package com.eteks.sweethome3d.model

Examples of com.eteks.sweethome3d.model.SelectionListener


  /**
   * Adds selection listeners to this table.
   */
  private void addSelectionListeners(final FurnitureLibraryController controller) {  
    final SelectionListener controllerSelectionListener = new SelectionListener() {
        public void selectionChanged(SelectionEvent ev) {
          setSelectedFurniture(controller.getSelectedFurniture());       
        }
      };
    this.tableSelectionListener = new ListSelectionListener () {
View Full Code Here


    getContentPane().add(createToolBar(preferences, controller), BorderLayout.NORTH);
   
    // Map Enter accelerator of furniture library to furniture modification action
    furnitureLibraryView.getInputMap().put(KeyStroke.getKeyStroke("ENTER"), ActionType.MODIFY_FURNITURE);
    furnitureLibraryView.getActionMap().put(ActionType.MODIFY_FURNITURE, getActionMap().get(ActionType.MODIFY_FURNITURE));
    controller.getFurnitureLibraryController().addSelectionListener(new SelectionListener() {
        public void selectionChanged(SelectionEvent ev) {
          getActionMap().get(ActionType.DELETE).setEnabled(!ev.getSelectedItems().isEmpty());
          getActionMap().get(ActionType.MODIFY_FURNITURE).setEnabled(!ev.getSelectedItems().isEmpty());
        }
      });
View Full Code Here

  /**
   * Adds selection listeners to this table.
   */
  private void addSelectionListeners(final Home home,
                                     final FurnitureController controller) {  
    final SelectionListener homeSelectionListener = new SelectionListener() {
        public void selectionChanged(SelectionEvent ev) {
          updateTableSelectedFurniture(home.getSelectedItems());       
        }
      };
    this.tableSelectionListener = new ListSelectionListener () {
View Full Code Here

   */
  private JToggleButton.ToggleButtonModel createBoldStyleToggleModel(final Home home,
                                                                     final UserPreferences preferences) {
    return new JToggleButton.ToggleButtonModel() {
      {
        home.addSelectionListener(new SelectionListener() {
          public void selectionChanged(SelectionEvent ev) {
            fireStateChanged();
          }
        });
      }
View Full Code Here

   */
  private JToggleButton.ToggleButtonModel createItalicStyleToggleModel(final Home home,
                                                                       final UserPreferences preferences) {
    return new JToggleButton.ToggleButtonModel() {
      {
        home.addSelectionListener(new SelectionListener() {
          public void selectionChanged(SelectionEvent ev) {
            fireStateChanged();
          }
        });
      }
View Full Code Here

  public View getVerticalRulerView() {
    return getView().getVerticalRuler();
  }
 
  private void addModelListeners() {
    this.selectionListener = new SelectionListener() {
        public void selectionChanged(SelectionEvent ev) {
          if (getView() != null) {
            getView().makeSelectionVisible();
          }
        }
View Full Code Here

  /**
   * Adds the listeners that manage selection synchronization in this tree.
   */
  private void addSelectionListeners(final FurnitureCatalog catalog,
                                     final FurnitureCatalogController controller) {
    final SelectionListener modelSelectionListener = new SelectionListener() {
        public void selectionChanged(SelectionEvent selectionEvent) {
          updateTreeSelectedFurniture(catalog, controller);       
        }
      };
    this.treeSelectionListener = new TreeSelectionListener () {
View Full Code Here

  /**
   * Adds the listeners that manage selection synchronization in this tree.
   */
  private void addSelectionListeners(final FurnitureCatalog catalog,
                                     final FurnitureCatalogController controller) {
    final SelectionListener modelSelectionListener = new SelectionListener() {
        public void selectionChanged(SelectionEvent selectionEvent) {
          updateListSelectedFurniture(catalog, controller);       
        }
      };
    this.listSelectionListener = new ListSelectionListener() {
View Full Code Here

  /**
   * Adds a selection listener to catalog that enables / disables Add Furniture action.
   */
  private void addCatalogSelectionListener() {
    getFurnitureCatalogController().addSelectionListener(new SelectionListener() {
          public void selectionChanged(SelectionEvent ev) {
            enableActionsBoundToSelection();
          }
        });
  }
View Full Code Here

  /**
   *  Adds a selection listener to home that enables / disables actions on selection.
   */
  private void addHomeSelectionListener() {
    if (this.home != null) {
      this.home.addSelectionListener(new SelectionListener() {
        public void selectionChanged(SelectionEvent ev) {
          enableActionsBoundToSelection();
        }
      });
    }
View Full Code Here

TOP

Related Classes of com.eteks.sweethome3d.model.SelectionListener

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.