예제 #1
0
  /** Redraw this item, retrieves new labels from its label provider. */
  void refresh() {
    String text = fLabelProvider.getText(getData());
    Image image = fLabelProvider.getImage(getData());
    String toolTip = fToolTipLabelProvider.getText(getData());

    fDetailsBlock.setText(text);
    fDetailsBlock.setImage(image);
    fDetailsBlock.setToolTip(toolTip);

    refreshArrow();
  }
예제 #2
0
  /*
   * @see org.eclipse.swt.widgets.Item#setText(java.lang.String)
   */
  @Override
  public void setText(String string) {
    super.setText(string);
    fDetailsBlock.setText(string);

    // more or less space might be required for the label
    if (fIsLast) fContainer.layout(true, true);
  }
예제 #3
0
 /*
  * @see org.eclipse.swt.widgets.Item#setImage(org.eclipse.swt.graphics.Image)
  */
 @Override
 public void setImage(Image image) {
   super.setImage(image);
   fDetailsBlock.setImage(image);
 }
예제 #4
0
 /**
  * Set the tool tip of the item to the given text.
  *
  * @param text the tool tip for the item
  */
 public void setToolTip(String text) {
   fDetailsBlock.setToolTip(text);
 }
예제 #5
0
 /**
  * Sets whether or not the this item should show the details (name and label).
  *
  * @param visible true if the item shows details
  */
 void setDetailsVisible(boolean visible) {
   fDetailsBlock.setVisible(visible);
 }
예제 #6
0
 /**
  * Returns whether this item has the keyboard focus.
  *
  * @return <code>true</code> if this item has the keyboard focus
  */
 boolean hasFocus() {
   return fDetailsBlock.hasFocus();
 }
예제 #7
0
 /**
  * Sets whether this item has the keyboard focus.
  *
  * @param state <code>true</code> if it has focus, <code>false</code> otherwise
  */
 void setFocus(boolean state) {
   fDetailsBlock.setFocus(state);
 }
예제 #8
0
 /**
  * Sets whether this item has to be marked as selected or not.
  *
  * @param selected true if marked as selected
  */
 void setSelected(boolean selected) {
   fDetailsBlock.setSelected(selected);
 }
예제 #9
0
 /**
  * Returns the width of this item.
  *
  * @return the width of this item
  */
 int getWidth() {
   return fDetailsBlock.getWidth() + fExpandBlock.getWidth() + 2;
 }
예제 #10
0
 /**
  * Does this item show a text label?
  *
  * @return true if it does.
  */
 boolean isShowText() {
   return fDetailsBlock.isTextVisible();
 }
예제 #11
0
 /**
  * Should this item show a text label.
  *
  * @param enabled true if it should
  */
 void setShowText(boolean enabled) {
   fDetailsBlock.setTextVisible(enabled);
 }