1 19 20 package org.netbeans.spi.palette; 21 import javax.swing.Action ; 22 import org.netbeans.modules.palette.Category; 23 import org.netbeans.modules.palette.Item; 24 import org.netbeans.modules.palette.Model; 25 import org.netbeans.modules.palette.ModelListener; 26 import org.openide.util.Lookup; 27 28 29 30 34 public class ProxyModel implements Model { 35 36 boolean showCustomizerCalled = false; 37 private Model original; 38 39 40 public ProxyModel( Model original ) { 41 this.original = original; 42 } 43 44 public void showCustomizer(PaletteController pc, org.netbeans.modules.palette.Settings settings) { 45 showCustomizerCalled = true; 46 } 48 49 public void addModelListener(ModelListener listener) { 50 original.addModelListener( listener ); 51 } 52 53 public void removeModelListener(ModelListener listener) { 54 original.removeModelListener( listener ); 55 } 56 57 public boolean moveCategory( Category source, Category target, boolean moveBefore ) { 58 return original.moveCategory( source, target, moveBefore ); 59 } 60 61 public void refresh() { 62 original.refresh(); 63 } 64 65 public Action [] getActions() { 66 return original.getActions(); 67 } 68 69 public Category[] getCategories() { 70 return original.getCategories(); 71 } 72 73 public String getName() { 74 return original.getName(); 75 } 76 77 public Lookup getRoot() { 78 return original.getRoot(); 79 } 80 81 public Category getSelectedCategory() { 82 return original.getSelectedCategory(); 83 } 84 85 public Item getSelectedItem() { 86 return original.getSelectedItem(); 87 } 88 89 public void setSelectedItem(Lookup category, Lookup item) { 90 original.setSelectedItem( category, item ); 91 } 92 93 public void clearSelection() { 94 original.clearSelection(); 95 } 96 97 public boolean canReorderCategories() { 98 return original.canReorderCategories(); 99 } 100 } 101 | Popular Tags |