当前位置: 首页>>代码示例>>Java>>正文


Java ObservableList类代码示例

本文整理汇总了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;
        }
    }
}
 
开发者ID:RUB-NDS,项目名称:OpenID-Attacker,代码行数:17,代码来源:AttackParameterKeeper.java

示例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);
    }
}
 
开发者ID:RUB-NDS,项目名称:OpenID-Attacker,代码行数:18,代码来源:AttackParameterKeeper.java

示例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);
}
 
开发者ID:4refr0nt,项目名称:ESPlorer,代码行数:14,代码来源:ListBindingManager.java

示例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());
}
 
开发者ID:4refr0nt,项目名称:ESPlorer,代码行数:14,代码来源:ListBindingManager.java

示例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);
}
 
开发者ID:4refr0nt,项目名称:ESPlorer,代码行数:10,代码来源:ListBindingManager.java

示例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;
        }
    }
}
 
开发者ID:RUB-NDS,项目名称:OpenID-Attacker,代码行数:15,代码来源:AttackParameterKeeper.java

示例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);
    }
}
 
开发者ID:RUB-NDS,项目名称:OpenID-Attacker,代码行数:9,代码来源:AttackParameterKeeper.java

示例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;
        }
    });
}
 
开发者ID:RUB-NDS,项目名称:OpenID-Attacker,代码行数:37,代码来源:AttackOverviewGui.java

示例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);
    }

}
 
开发者ID:RUB-NDS,项目名称:OpenID-Attacker,代码行数:11,代码来源:AttackOverviewGui.java

示例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);
    }
}
 
开发者ID:RUB-NDS,项目名称:OpenID-Attacker,代码行数:10,代码来源:AttackOverviewGui.java

示例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);
}
 
开发者ID:RUB-NDS,项目名称:OpenID-Attacker,代码行数:9,代码来源:AttackOverviewGui.java

示例12: listElementPropertyChanged

import org.jdesktop.observablecollections.ObservableList; //导入依赖的package包/类
public final void listElementPropertyChanged(ObservableList list, int index) {
    changed(index);
}
 
开发者ID:4refr0nt,项目名称:ESPlorer,代码行数:4,代码来源:ListBindingManager.java

示例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;
}
 
开发者ID:RUB-NDS,项目名称:OpenID-Attacker,代码行数:7,代码来源:AttackParameterKeeper.java

示例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;
}
 
开发者ID:RUB-NDS,项目名称:OpenID-Attacker,代码行数:7,代码来源:SearchReplaceAttackParameter.java

示例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);
}
 
开发者ID:RUB-NDS,项目名称:OpenID-Attacker,代码行数:11,代码来源:UserDataCollector.java


注:本文中的org.jdesktop.observablecollections.ObservableList类示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。