下面列出了org.eclipse.swt.widgets.Text#LIMIT 实例代码,或者点击链接到github查看源代码,也可以在右侧发表评论。
public LabeledInputField(Composite parent, String label, Typ typ){
this(parent, label, typ, Text.LIMIT);
}
/**
* create control of type HYPERLINK
*
* @param anzeige
* String, the label shown above the field
* @param feldname
* the database field name
* @param cp
* an IContentProvider used to display the contents
*/
public InputData(String anzeige, String feldname, IContentProvider cp){
sAnzeige = anzeige;
sFeldname = feldname;
ext = cp;
tFeldTyp = Typ.HYPERLINK;
sLimit = Text.LIMIT;
}
/**
* simply creates a LabeledInputField of Type LabeledInputField.Typ.TEXT}
*
* @param parent
* @param label
* the label to show above the field
*/
public LabeledInputField(Composite parent, String label){
this(parent, label, Typ.TEXT, Text.LIMIT);
}
/**
* create control of different types.
*
* @param anzeige
* String, the label shown above the field
* @param feldname
* the database field name
* @param feldtyp
* field type to use, one of InputData.Typ
* @param hashname
* the name of the field in the hashfield, set to null if feldname is not a hash
*/
public InputData(String anzeige, String feldname, Typ feldtyp, String hashname){
this(anzeige, feldname, feldtyp, hashname, Text.LIMIT);
}
/**
* create control of type STRING. label and fieldType are the same
*
* @param all
* the fieldname, also used for the label
*/
public InputData(String all){
this(all, all, Typ.STRING, null, Text.LIMIT);
}
/**
* Provide an executable link input field; that is, on click on the resp. label (like the
* hyperlink), an executable can be called by a callback on cp
*
* @param anzeige
* the name of the label (will be clickable, calling cp)
* @param feldname
* the field name
* @param feldtyp
* the field type
* @param cp
* executable callback
* @author M. Descher
*/
public InputData(String anzeige, String feldname, IExecLinkProvider cp){
this(anzeige, feldname, Typ.EXECSTRING, null, Text.LIMIT);
ext = cp;
}
/**
* create control of type LIST
*
* @param anzeige
* String, the label shown above the field
* @param feldname
* the database field name
* @param hashname
* the name of the field in the hashfield, set to null if feldname is not a hash
* @param choices
* the items to be displayed in the list
*/
public InputData(String anzeige, String feldname, String hashname, String[] choices){
this(anzeige, feldname, Typ.LIST, hashname, Text.LIMIT);
ext = choices;
}
/**
* create control of type COMBO
*
* @param anzeige
* String, the label shown above the field
* @param feldname
* the database field name
* @param hashname
* the name of the field in the hashfield, set to null if feldname is not a hash
* @param comboItems
* the items to be displayed in the combo
* @param bDropDown
* just to select this method - not used actually...
*/
public InputData(String anzeige, String feldname, String hashname, String[] comboItems,
boolean bDropDown){
this(anzeige, feldname, Typ.COMBO, hashname, Text.LIMIT);
ext = comboItems;
}