public String title() { return naked.titleString(); } }
public TextView(Content content, ViewSpecification specification, ViewAxis axis) { super(content, specification, axis); Naked object = content.getNaked(); text = object == null ? "" : object.titleString(); }
public int compare(final NakedObject sortedElement) { Naked refTo = field.get(sortedElement); String sortedTitle = refTo == null ? null : refTo.titleString(); sortedTitle = sortedTitle == null ? "" : sortedTitle; int compareTo = sortedTitle.compareTo(title); return compareTo; }
public void init(final NakedObject element) { Naked refTo = field.get(element); title = refTo == null ? null : refTo.titleString(); title = title == null ? "" : title; }
public String title() { return getNaked().titleString(); }
private String text() { String text; ValueContent content = (ValueContent) getContent(); text = content.getNaked().titleString(); return text; }
public RuntimeException createExceptionFor( String id, Naked argNaked) { String message = "Proposed value '" + argNaked.titleString() + "' exceeds the maximum length of " + value(); return new InvalidMaxLengthException(id, message, argNaked, value()); }
public void setSelection(OptionContent selectedContent) { Naked option = selectedContent.getNaked(); content.parseTextEntry(option.titleString()); content.entryComplete(); }
public Consent canDrop(final Content sourceContent) { NakedObject target = (NakedObject) getObject(); if (!(sourceContent instanceof ObjectContent) || target == null) { return new Veto("Can't drop " + sourceContent.getNaked().titleString() + " on to empty target"); } else { NakedObject source = ((ObjectContent) sourceContent).getObject(); return canDropOntoObject(target, source); } }
public RuntimeException createExceptionFor(final String id, final Naked argNaked) { String message = "Proposed value '" + argNaked.titleString() + "' does not match pattern '" + format() + "'"; return new InvalidRegExException(id, message, argNaked, this.format(), this.validation(), this.caseSensitive()); }
boolean notEmpty = (value.titleString().length() > 0); if (notEmpty) { String valueStr = value.titleString(); xmlValueElement.appendChild(getXmlDocument().createTextNode(valueStr));
/** * Responds to first click by placing the cursor between the two characters nearest the point of the * mouse. */ public void firstClick(final Click click) { if (canChangeValue().isAllowed()) { Location at = click.getLocation(); at.subtract(HPADDING, VPADDING); cursor.cursorAt(at); resetSelection(); // testing if (cursor.getLine() > textContent.getNoLinesOfContent()) { throw new NakedObjectRuntimeException("not inside content for line " + cursor.getLine() + " : " + textContent.getNoLinesOfContent()); } markDamaged(); } if (!canChangeValue().isAllowed() || click.isShift() || click.button2()) { View textView = new PanelBorder(1, Toolkit.getColor("primary1"), Toolkit.getColor("primary3"), new TextView( getContent().getNaked().titleString())); getViewManager().setOverlayView(textView); textView.setLocation(getAbsoluteLocation()); textView.markDamaged(); } }