Changeset 1707
- Timestamp:
- 01/07/12 17:40:13 (4 months ago)
- Location:
- trunk/src/org/rapla
- Files:
-
- 6 modified
-
RaplaResources.xml (modified) (2 diffs)
-
components/calendarview/swing/AbstractSwingCalendar.java (modified) (3 diffs)
-
components/calendarview/swing/SwingCompactWeekView.java (modified) (5 diffs)
-
gui/internal/view/ClassificationInfoUI.java (modified) (3 diffs)
-
gui/internal/view/ReservationInfoUI.java (modified) (1 diff)
-
plugin/compactweekview/SwingCompactWeekCalendar.java (modified) (4 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/org/rapla/RaplaResources.xml
r1695 r1707 566 566 <text lang="pl">Drukuj</text> 567 567 </entry> 568 <entry key="printdocument"> 569 <text lang="en">Print</text> 570 <text lang="de">Drucke</text> 571 <text lang="fr">Imprimer</text> 572 <text lang="es">Imprimir</text> 573 <text lang="cs">Tisknout</text> 574 <text lang="nl">Afdrukken</text> 575 <text lang="pl">Drukuj</text> 576 </entry> 568 577 <entry key="print_to_file"> 569 578 <text lang="en">Print to File</text> … … 2084 2093 <text lang="nl">Geregistreerd door</text> 2085 2094 <text lang="pl">Rezerwacja przez</text> 2095 </entry> 2096 <entry key="on"> 2097 <text lang="en">on</text> 2098 <text lang="de">am</text> 2099 <text lang="fr">Ã la</text> 2100 <text lang="es">en el</text> 2101 <text lang="cs">na</text> 2102 <text lang="nl">aan de</text> 2103 <text lang="pl">na</text> 2086 2104 </entry> 2087 2105 <entry key="resource.owner"> -
trunk/src/org/rapla/components/calendarview/swing/AbstractSwingCalendar.java
r1567 r1707 72 72 /** Calendar used by the put block method */ 73 73 protected Calendar blockCalendar; 74 /** Differing slot size for resource column */ 75 private int resourceSlotSize; 74 76 75 77 AbstractSwingCalendar(boolean showScrollPane) { … … 86 88 scrollPane.setHorizontalScrollBarPolicy(ScrollPaneConstants.HORIZONTAL_SCROLLBAR_AS_NEEDED); 87 89 scrollPane.setViewportView(jCenter); 88 89 90 91 90 scrollPane.setColumnHeaderView(jTitlePanel); 92 91 scrollPane.getVerticalScrollBar().setUnitIncrement(10); … … 360 359 abstract Date createDate( DaySlot slot, int row, boolean startOfRow); 361 360 361 public int getResourceSlotSize() { 362 return resourceSlotSize; 363 } 364 365 public void setResourceSlotSize(int resourceSlotSize) { 366 this.resourceSlotSize = resourceSlotSize; 367 } 368 362 369 363 370 } -
trunk/src/org/rapla/components/calendarview/swing/SwingCompactWeekView.java
r1499 r1707 142 142 143 143 if ( slotNames.length > 0) { 144 tableLayout.insertColumn(0, slotSize);144 tableLayout.insertColumn(0, getResourceSlotSize()); 145 145 jHeader.add( createSlotHeader( null ), "0,0,l,t" ); 146 146 } else { … … 151 151 for (int column=0;column<COLUMNS;column++) { 152 152 if ( !isExcluded(column) ) { 153 tableLayout.insertColumn(column + 1, slotSize ); 153 int width = getSlotSize(); 154 tableLayout.insertColumn(column + 1, width ); 154 155 jHeader.add( createSlotHeader( calendar.getTime() ) ); 155 156 } else { … … 187 188 if ( slot < slotNames.length ) { 188 189 label.setText( slotNames[ slot ] ); 190 label.setToolTipText(slotNames[ slot] ); 189 191 } 190 192 return label; … … 202 204 jLabel.setBorder(isEditable() ? SLOTHEADER_BORDER : null); 203 205 } 204 Dimension dim = new Dimension(this.slotSize,20); 206 int width = -1; 207 if( date == null ) 208 { 209 jLabel.setBorder(SLOTHEADER_BORDER); 210 width = getResourceSlotSize(); 211 } 212 else 213 { 214 width = getSlotSize(); 215 } 216 Dimension dim = new Dimension(width,20); 205 217 jLabel.setPreferredSize( dim); 206 218 jLabel.setMinimumSize( dim ); … … 210 222 211 223 private SmallDaySlot createField(List blocks, int column) { 212 SmallDaySlot c= new SmallDaySlot("",slotSize, Color.BLACK); 224 int width = getSlotSize(); 225 SmallDaySlot c= new SmallDaySlot("", width, Color.BLACK); 213 226 c.setEditable(isEditable()); 214 227 c.setDraggingHandler(draggingHandler); -
trunk/src/org/rapla/gui/internal/view/ClassificationInfoUI.java
r1685 r1707 20 20 21 21 import org.rapla.entities.Timestamp; 22 import org.rapla.entities.domain.Reservation; 22 23 import org.rapla.entities.dynamictype.AttributeAnnotations; 23 24 import org.rapla.entities.dynamictype.Attribute; 24 25 import org.rapla.entities.dynamictype.Classifiable; 25 26 import org.rapla.entities.dynamictype.Classification; 27 import org.rapla.entities.storage.RefEntity; 28 import org.rapla.entities.storage.internal.SimpleIdentifier; 26 29 import org.rapla.framework.RaplaContext; 27 30 import org.rapla.framework.RaplaException; … … 37 40 Locale locale = getRaplaLocale().getLocale(); 38 41 encode( classification.getType().getName(locale), buf ); 42 if ( classifiable instanceof RefEntity ) 43 { 44 int id = ((SimpleIdentifier)((RefEntity) classifiable).getId()).getKey(); 45 buf.append(" ("); 46 buf.append(Integer.valueOf(id)); 47 buf.append(")"); 48 } 39 49 buf.append( "</strong>"); 40 50 } … … 100 110 if ( lastChangeTime != null) 101 111 { 102 buf.append("<div style=\"font-size: 7px;margin-bottom:4px;\">");112 buf.append("<div style=\"font-size:8px;margin-bottom:4px;\">"); 103 113 if ( createTime != null) 104 114 { -
trunk/src/org/rapla/gui/internal/view/ReservationInfoUI.java
r1685 r1707 89 89 final Locale locale = getLocale(); 90 90 final String ownerName = owner.getName(locale); 91 String ownerText = encode(ownerName); 92 if (controller != null) 93 ownerText = controller.createLink(owner,ownerName); 94 95 att.add( new Row(getString("reservation.owner"), ownerText)); 91 StringBuilder ownerText = new StringBuilder(); 92 if (controller == null) 93 { 94 ownerText.append( encode(ownerName) ); 95 } 96 else 97 { 98 ownerText.append( controller.createLink(owner,ownerName) ); 99 } 100 ownerText.append( " "); 101 ownerText.append( getI18n().getString("on") ); 102 ownerText.append( " "); 103 ownerText.append( getRaplaLocale().formatDate(reservation.getCreateTime()) ); 104 att.add( new Row(getString("reservation.owner"), ownerText.toString() )); 96 105 User lastChangeBy = reservation.getLastChangedBy(); 97 106 if ( lastChangeBy != null && (owner == null ||! lastChangeBy.equals(owner))) { -
trunk/src/org/rapla/plugin/compactweekview/SwingCompactWeekCalendar.java
r1319 r1707 36 36 import org.rapla.components.calendarview.swing.ViewListener; 37 37 import org.rapla.components.util.DateTools; 38 import org.rapla.components.xmlbundle.I18nBundle; 38 39 import org.rapla.entities.NamedComparator; 39 40 import org.rapla.entities.domain.Allocatable; … … 52 53 public class SwingCompactWeekCalendar extends AbstractRaplaSwingCalendar 53 54 { 55 /** 56 * Default slot size for each column of calendar view 57 * TODO: Make configurable 58 */ 59 private static final int DEFAULTSLOTSIZE = 120; 60 /** 61 * Default slot size for resource column preceding day columns 62 */ 63 private static final int DEFAULTRESOURCESLOTSIZE = 70; 64 54 65 public SwingCompactWeekCalendar(RaplaContext sm,CalendarModel settings, boolean editable) throws RaplaException { 55 66 super( sm, settings, editable); … … 75 86 component.setToolTipText(toolTip); 76 87 } 88 } 89 else 90 { 91 String text = getI18n().getString("resources"); 92 component.setText(text); 93 component.setOpaque(true); 94 component.setToolTipText(text); 77 95 } 78 96 return component; … … 159 177 if ( !view.isEditable() ) { 160 178 view.setSlotSize( model.getSize()); 179 view.setResourceSlotSize(model.getSize()); 161 180 } else { 162 view.setSlotSize( 150 ); 163 } 181 view.setSlotSize( DEFAULTSLOTSIZE ); 182 view.setResourceSlotSize(DEFAULTRESOURCESLOTSIZE); 183 } 164 184 } 165 185
![(please configure the [header_logo] section in trac.ini)](/chrome/site/rapla.jpg)