Required Information

Version(s) of Ext GWT
GXT 3.0.1

Browser versions and OS
(and desktop environment, if applicable)
  • Chrome 22, Win7

Virtual Machine
No

Description
We are making our own theme. We have subclassed TriggerFieldDefaultAppearance, but it would be a lot easier if more was protected instead of private. Specifically, the member fields resources and style, and the helper function renderInput(). We are overriding render(), and all 3 of those are used in render. Currently, we have to shadow them, including copy-pasting the renderIntput function into our subclass. Are we doing something unintended here, or should those fields/function be made protected instead?

Most "DefaultAppearance" classes use protected for members and helpers and are easy to override, so I hope this was just an oversight.

Run mode
both

Steps to reproduce the problem
  1. Try to subclass TriggerFieldDefaultAppearance
  2. Override render(), try to use resources and style, or call renderInput

Expected result
Compiles

Actual result
Fails to compile because members are private rather than protected.

Test case
Code:
package airmarshal.client.theme.lux.field;
import com.google.gwt.core.client.GWT;
import com.google.gwt.safehtml.shared.SafeHtmlBuilder;
import com.sencha.gxt.cell.core.client.form.FieldCell.FieldAppearanceOptions;
import com.sencha.gxt.theme.base.client.field.TriggerFieldDefaultAppearance;
public class LuxTriggerFieldAppearance extends TriggerFieldDefaultAppearance {

  public LuxTriggerFieldAppearance() {
    this(GWT.<TriggerFieldResources> create(TriggerFieldResources.class));
  }

  public LuxTriggerFieldAppearance(TriggerFieldResources resources) {
    super(resources);
  }

  @Override
  public void render(SafeHtmlBuilder sb, String value, FieldAppearanceOptions options) {

    SafeStyles inputStyles = SafeStylesUtils.fromTrustedString("width:" + width + "px;");
    sb.appendHtmlConstant("<div class='" + style.trigger() + "' />");
    sb.renderInput(sb, value, inputStyles, options);
  }
}
Possible fix
Make private fields and methods protected.