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); }
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(); }
public String toString() { return FastMessagesUtil.getMessage("diagram.label"); }