boolean res = adjusted;
oObj.removeAdjustmentListener(listener);
adjusted = false;
adjustScrollBar();
res &= !adjusted;
tRes.tested("addAdjustmentListener()", res);
}
publicvoid _removeAdjustmentListener() { //this method is checked in addAdjustmentListener //so that method is required here and if it works //this method is given OK too
requiredMethod("addAdjustmentListener()");
tRes.tested("removeAdjustmentListener()", true);
}
publicvoid _setBlockIncrement() {
oObj.setBlockIncrement(15);
oObj.setBlockIncrement(5); int bi = oObj.getBlockIncrement();
tRes.tested("setBlockIncrement()",bi==5);
}
publicvoid _getBlockIncrement() { //this method is checked in the corresponding set method //so that method is required here and if it works //this method is given OK too
requiredMethod("setBlockIncrement()");
tRes.tested("getBlockIncrement()", true);
}
publicvoid _setLineIncrement() {
oObj.setLineIncrement(12);
oObj.setLineIncrement(2); int li = oObj.getLineIncrement();
tRes.tested("setLineIncrement()",li==2);
}
publicvoid _getLineIncrement() { //this method is checked in the corresponding set method //so that method is required here and if it works //this method is given OK too
requiredMethod("setLineIncrement()");
tRes.tested("getLineIncrement()", true);
}
publicvoid _setMaximum() {
oObj.setMaximum(490);
oObj.setMaximum(480); int max = oObj.getMaximum();
tRes.tested("setMaximum()",max==480);
}
publicvoid _getMaximum() { //this method is checked in the corresponding set method //so that method is required here and if it works //this method is given OK too
requiredMethod("setMaximum()");
tRes.tested("getMaximum()", true);
}
publicvoid _setOrientation() {
oObj.setOrientation(ScrollBarOrientation.HORIZONTAL);
oObj.setOrientation(ScrollBarOrientation.VERTICAL); int ori = oObj.getOrientation();
tRes.tested("setOrientation()",ori==ScrollBarOrientation.VERTICAL);
}
publicvoid _getOrientation() { //this method is checked in the corresponding set method //so that method is required here and if it works //this method is given OK too
requiredMethod("setOrientation()");
tRes.tested("getOrientation()", true);
}
publicvoid _setValue() {
oObj.setMaximum(600);
oObj.setValue(480);
oObj.setValue(520); int val = oObj.getValue();
tRes.tested("setValue()",val==520);
}
publicvoid _getValue() { //this method is checked in the corresponding set method //so that method is required here and if it works //this method is given OK too
requiredMethod("setValue()");
tRes.tested("getValue()", true);
}
publicvoid _setVisibleSize() {
oObj.setVisibleSize(700);
oObj.setVisibleSize(500); int vs = oObj.getVisibleSize();
tRes.tested("setVisibleSize()",vs==500);
}
publicvoid _getVisibleSize() { //this method is checked in the corresponding set method //so that method is required here and if it works //this method is given OK too
requiredMethod("setVisibleSize()");
tRes.tested("getVisibleSize()", true);
}
publicvoid _setValues() {
oObj.setValues(80, 200, 300);
oObj.setValues(70, 210, 500); int val = oObj.getValue(); int vs = oObj.getVisibleSize(); int max = oObj.getMaximum();
tRes.tested("setValues()",((val==70) && (vs==210) && (max==500)));
}
Die Informationen auf dieser Webseite wurden
nach bestem Wissen sorgfältig zusammengestellt. Es wird jedoch weder Vollständigkeit, noch Richtigkeit,
noch Qualität der bereit gestellten Informationen zugesichert.
Bemerkung:
Die farbliche Syntaxdarstellung und die Messung sind noch experimentell.