1 30 package com.genimen.djeneric.tools.specifier.interfaces; 31 32 import java.awt.Component ; 33 34 import com.genimen.djeneric.repository.DjAssociation; 35 import com.genimen.djeneric.repository.DjExtent; 36 import com.genimen.djeneric.repository.DjList; 37 import com.genimen.djeneric.repository.DjObject; 38 import com.genimen.djeneric.repository.DjSession; 39 import com.genimen.djeneric.repository.DjSynchronizationListener; 40 import com.genimen.djeneric.repository.exceptions.DjenericException; 41 import com.genimen.djeneric.repository.exceptions.ObjectNotDefinedException; 42 import com.genimen.djeneric.structure.ExtentUsage; 43 import com.genimen.djeneric.structure.PropertyUsage; 44 import com.genimen.djeneric.structure.RelationUsage; 45 import com.genimen.djeneric.tools.specifier.components.DjBindable; 46 import com.genimen.djeneric.tools.specifier.editor.DjenericObjectModel; 47 48 54 public interface ObjectViewer extends DjSynchronizationListener 55 { 56 public void addDetailViewer(ObjectViewer detail, RelationUsage via); 57 58 public boolean isDetail(); 59 60 public void synchronize() throws DjenericException; 61 62 public void synchronizeUnderlyingAssociation() throws DjenericException; 63 64 public void setViewerFor(DjList data, DjAssociation assoc) throws DjenericException; 65 66 public void setEnabled(boolean b); 67 68 public boolean isEnabled(); 69 70 public void clear() throws DjenericException; 71 72 public void addModelListener(ObjectModelListener lsnr); 73 74 public void addViewerListener(ObjectViewerListener lsnr); 75 76 public void removeModelListener(ObjectModelListener lsnr); 77 78 public void requestFocus(); 79 80 public DjenericObjectModel getModel(); 81 82 public void setStatusMessage(String msg); 83 84 public void setStatusMessage(Throwable t); 85 86 public void setStatusMessage(String msg, boolean isInformative); 87 88 public boolean isEditable(); 89 90 public void setEditable(boolean b); 91 92 public boolean isDeleteable(); 93 94 public void setDeleteable(boolean b); 95 96 public boolean isInserteable(); 97 98 public void setInserteable(boolean b); 99 100 public void markForDelete() throws DjenericException; 101 102 public void tellRowPosition(); 103 104 public DjObject getSelectedValue(); 105 106 public int getSelectedIndex(); 107 108 public void setSelectedIndex(int idx) throws DjenericException; 109 110 public boolean isNew(); 111 112 public void createNew() throws DjenericException; 113 114 public String getString(int cellIdx) throws DjenericException; 115 116 public void setString(int cellIdx, String value) throws DjenericException; 117 118 public Object getValue(int cellIdx) throws DjenericException; 119 120 public void setValue(int cellIdx, Object value) throws DjenericException; 121 122 public int getRowCount(); 123 124 public DjExtent getExtent(); 125 126 public ExtentUsage getExtentUsage(); 127 128 public void next() throws DjenericException; 129 130 public void prev() throws DjenericException; 131 132 public void top() throws DjenericException; 133 134 public void bottom() throws DjenericException; 135 136 public boolean isCellUpdateable(int cellIdx); 137 138 public boolean isCellRequired(int cellIdx); 139 140 public int getCellIndex(String propertyName) throws ObjectNotDefinedException; 141 142 public int getPropertyUsageCount(); 143 144 public PropertyUsage getPropertyUsage(int cellIdx); 145 146 public PropertyUsage getPropertyUsageByName(String propertyName) throws ObjectNotDefinedException; 147 148 public void validateModel(boolean rememberIndices) throws DjenericException; 149 150 public void requestFocus(String propertyName); 151 152 public String getTitle(); 153 154 public void bindEditor(DjSession session, DjBindable comp, String propertyName) throws DjenericException; 155 156 public void unbindEditors(); 157 158 public void updateAllModels(DjSession session) throws DjenericException; 159 160 public void setMaster(ObjectViewer master, RelationUsage via); 161 162 public ObjectViewer getMaster(); 163 164 public void updateDetailLinks() throws DjenericException; 165 166 public boolean isRestricted(int cellIdx) throws DjenericException; 167 168 public void rememberSelectedIndex(); 169 170 public void returnToRemberedIndex() throws DjenericException; 171 172 public void focusReceived(Component component); 173 174 public void reload() throws DjenericException; 175 176 public void synchronizeUsage(); 177 178 public void setInserteableRecursive(boolean b); 179 180 public void setDeleteableRecursive(boolean b); 181 182 public void setEditableRecursive(boolean b); 183 } | Popular Tags |