コード例 #1
0
 public String getText(Object element) {
   if (element instanceof Integer) {
     Integer integer = (Integer) element;
     if (ROUTER_MANUAL.intValue() == integer.intValue())
       return FastMessagesUtil.getMessage("pd.diagram.cr.manual");
     if (ROUTER_MANHATTAN.intValue() == integer.intValue())
       return FastMessagesUtil.getMessage("pd.diagram.cr.manhattan");
     if (ROUTER_SHORTEST_PATH.intValue() == integer.intValue())
       return FastMessagesUtil.getMessage("pd.diagram.cr.shortestPath");
   }
   return super.getText(element);
 }
コード例 #2
0
 public IPropertyDescriptor[] getPropertyDescriptors() {
   if (getClass().equals(FastDiagram.class)) {
     ComboBoxPropertyDescriptor cbd =
         new ComboBoxPropertyDescriptor(
             ID_ROUTER,
             FastMessagesUtil.getMessage("pd.diagram.cr"),
             new String[] {
               FastMessagesUtil.getMessage("pd.diagram.cr.manual"),
               FastMessagesUtil.getMessage("pd.diagram.cr.manhattan"),
               FastMessagesUtil.getMessage("pd.diagram.cr.shortestPath")
             });
     cbd.setLabelProvider(new ConnectionRouterLabelProvider());
     return new IPropertyDescriptor[] {cbd};
   }
   return super.getPropertyDescriptors();
 }
コード例 #3
0
 public String toString() {
   return FastMessagesUtil.getMessage("diagram.label");
 }