本文整理汇总了Java中org.jdesktop.observablecollections.ObservableList类的典型用法代码示例。如果您正苦于以下问题:Java ObservableList类的具体用法?Java ObservableList怎么用?Java ObservableList使用的例子?那么, 这里精选的类代码示例或许可以为您提供帮助。
ObservableList类属于org.jdesktop.observablecollections包,在下文中一共展示了ObservableList类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: listElementsAdded
import org.jdesktop.observablecollections.ObservableList; //导入依赖的package包/类
@Override
public void listElementsAdded(ObservableList list, int index, int length) {
List<AttackParameter> addedAttackParameters = (List<AttackParameter>) list;
boolean signedChanged = false;
int last = index + length;
for (int i = index; i < last; ++i) {
AttackParameter addedParameter = addedAttackParameters.get(i);
String addedName = addedParameter.getName();
if (OPENID_SIGNED.equals(addedName)) {
addedParameter.addPropertyChangeListener(AttackParameter.PROP_VALIDVALUE, this);
addedParameter.addPropertyChangeListener(AttackParameter.PROP_ATTACKVALUE, this);
handleSignedParameter(addedParameter);
break;
}
}
}
示例2: listElementReplaced
import org.jdesktop.observablecollections.ObservableList; //导入依赖的package包/类
@Override
public void listElementReplaced(ObservableList list, int index, Object oldElement) {
AttackParameter oldParameter = (AttackParameter) oldElement;
String oldName = oldParameter.getName();
if (OPENID_SIGNED.equals(oldName)) {
oldParameter.removePropertyChangeListener(AttackParameter.PROP_VALIDVALUE, this);
oldParameter.removePropertyChangeListener(AttackParameter.PROP_ATTACKVALUE, this);
setInEverySignatureToFalse();
}
AttackParameter newParameter = (AttackParameter) list.get(index);
String newName = newParameter.getName();
if (OPENID_SIGNED.equals(newName)) {
newParameter.addPropertyChangeListener(AttackParameter.PROP_VALIDVALUE, this);
newParameter.addPropertyChangeListener(AttackParameter.PROP_ATTACKVALUE, this);
handleSignedParameter(newParameter);
}
}
示例3: listElementsAdded
import org.jdesktop.observablecollections.ObservableList; //导入依赖的package包/类
public final void listElementsAdded(ObservableList list, int index, int length) {
if (length == 0) {
return;
}
if (managers != null) {
for (ColumnDescriptionManager manager : managers) {
manager.add(index, length);
}
}
added(index, length);
}
示例4: listElementsRemoved
import org.jdesktop.observablecollections.ObservableList; //导入依赖的package包/类
public final void listElementsRemoved(ObservableList list, int index, List elements) {
if (elements.size() == 0) {
return;
}
if (managers != null) {
for (ColumnDescriptionManager manager : managers) {
manager.remove(index, elements.size());
}
}
removed(index, elements.size());
}
示例5: listElementReplaced
import org.jdesktop.observablecollections.ObservableList; //导入依赖的package包/类
public final void listElementReplaced(ObservableList list, int index, Object oldElement) {
if (managers != null) {
for (ColumnDescriptionManager manager : managers) {
manager.replaced(index);
}
}
changed(index);
}
示例6: listElementsRemoved
import org.jdesktop.observablecollections.ObservableList; //导入依赖的package包/类
@Override
public void listElementsRemoved(ObservableList list, int index, List oldElements) {
List<AttackParameter> removedAttackParameter = (List<AttackParameter>) oldElements;
boolean signedChanged = false;
for (AttackParameter removedParameter : removedAttackParameter) {
String removedName = removedParameter.getName();
if (OPENID_SIGNED.equals(removedName)) {
removedParameter.removePropertyChangeListener(AttackParameter.PROP_VALIDVALUE, this);
removedParameter.removePropertyChangeListener(AttackParameter.PROP_ATTACKVALUE, this);
setInEverySignatureToFalse();
break;
}
}
}
示例7: listElementPropertyChanged
import org.jdesktop.observablecollections.ObservableList; //导入依赖的package包/类
@Override
public void listElementPropertyChanged(ObservableList list, int index) {
AttackParameter p = (AttackParameter) list.get(index);
String name = p.getName();
if (OPENID_SIGNED.equals(name)) {
handleSignedParameter(p);
}
}
示例8: AttackOverviewGui
import org.jdesktop.observablecollections.ObservableList; //导入依赖的package包/类
/**
* Creates new form AttackOverviewGui
* @param idpType
*/
public AttackOverviewGui(final IdpType idpType) {
initComponents();
controller.setIdp(idpType);
if (idpType.equals(IdpType.ANALYZER)) {
performAttack.setEnabled(false);
sendTokenToAttackerUrl.setEnabled(false);
}
// set speed for scrolling
parameterScrollPane.getVerticalScrollBar().setUnitIncrement(16);
AttackParameterKeeper keeper = controller.getServer().getParameterConfiguration();
ObservableList<AttackParameter> list = (ObservableList<AttackParameter>) keeper.getParameterList();
list.addObservableListListener(this);
newParameterName.setInputVerifier(new InputVerifier() {
final private AttackParameterKeeper parameters = controller.getServer().getParameterConfiguration();
@Override
public boolean verify(JComponent jc) {
String newName = newParameterName.getText();
boolean contained = parameters.hasParameter(newName);
if (contained) {
errorLabel.setText(String.format("Parameter '%s' already exist", newName));
} else {
errorLabel.setText("");
}
return !contained;
}
});
}
示例9: listElementsAdded
import org.jdesktop.observablecollections.ObservableList; //导入依赖的package包/类
@Override
public void listElementsAdded(ObservableList list, int index, int length) {
List<AttackParameter> addedParameters = (List<AttackParameter>) list;
int last = index + length;
for (int i = index; i < last; ++i) {
AttackParameter parameter = addedParameters.get(i);
addParameterToPanel(parameter, index);
}
}
示例10: listElementsRemoved
import org.jdesktop.observablecollections.ObservableList; //导入依赖的package包/类
@Override
public void listElementsRemoved(ObservableList list, int index, List oldElements) {
List<AttackParameter> removedParameters = (List<AttackParameter>) oldElements;
for (AttackParameter removed : removedParameters) {
AbstractAttackParameterGui gui = (AbstractAttackParameterGui) parameterPanel.getComponent(index);
gui.doUnbind();
parameterPanel.remove(index);
}
}
示例11: listElementReplaced
import org.jdesktop.observablecollections.ObservableList; //导入依赖的package包/类
@Override
public void listElementReplaced(ObservableList list, int index, Object oldElement) {
AttackParameter newParameter = (AttackParameter) list.get(index);
AbstractAttackParameterGui gui = (AbstractAttackParameterGui) parameterPanel.getComponent(index);
gui.doUnbind();
parameterPanel.remove(index);
addParameterToPanel(newParameter, index);
}
示例12: listElementPropertyChanged
import org.jdesktop.observablecollections.ObservableList; //导入依赖的package包/类
public final void listElementPropertyChanged(ObservableList list, int index) {
changed(index);
}
示例13: AttackParameterKeeper
import org.jdesktop.observablecollections.ObservableList; //导入依赖的package包/类
public AttackParameterKeeper() {
List<AttackParameter> listToObserve = new ArrayList<>();
ObservableList<AttackParameter> observableList = ObservableCollections.observableList(listToObserve);
observableList.addObservableListListener(this);
this.parameterList = observableList;
}
示例14: SearchReplaceAttackParameter
import org.jdesktop.observablecollections.ObservableList; //导入依赖的package包/类
public SearchReplaceAttackParameter() {
super();
List<SearchReplaceHolder> listToObserve = new ArrayList<>();
ObservableList<SearchReplaceHolder> observableList = ObservableCollections.observableList(listToObserve);
this.searchReplaceList = observableList;
}
示例15: setDataList
import org.jdesktop.observablecollections.ObservableList; //导入依赖的package包/类
/**
* Set the value of dataList
*
* @param dataList new value of dataList
*/
public void setDataList(ObservableList<UserData> dataList) {
ObservableList<UserData> oldDataList = this.dataList;
this.dataList = dataList;
firePropertyChange(PROP_DATALIST, oldDataList, dataList);
}