public void update(final String search) { interfaceWraps.clear(); HighLightWraps.clear(); for (final RSInterface iface : interfaces.getAll()) { toBreak: for (final RSComponent child : iface.getComponents()) { if (searchMatches(child, search)) { interfaceWraps.add(new RSInterfaceWrap(iface)); if (window.isVisible() && !listenerButton.isSelected() && !searchBox.getText().equals("")) { HighLightWraps.add(new HighLightInterface(iface, child, null, -1)); } break; } for (final RSComponent component : child.getComponents()) { if (searchMatches(component, search)) { interfaceWraps.add(new RSInterfaceWrap(iface)); if (window.isVisible() && !listenerButton.isSelected() && !searchBox.getText().equals("")) { HighLightWraps.add(new HighLightInterface(iface, child, component, -1)); } break toBreak; } } } } fireTreeStructureChanged(root); }
public RSComponent searchInterfacesText(final String string) { final RSInterface[] inters = interfaces.getAll(); for (final RSInterface inter : inters) { for (final RSComponent interfaceChild : inter.getComponents()) { if (interfaceChild.getText().toLowerCase().contains(string.toLowerCase())) { return interfaceChild; } } } return null; }
private void addOldComponent() { OldInterfaces.clear(); for (final RSInterface iface : interfaces.getAll()) { for (final RSComponent child : iface.getComponents()) { OldInterfaces.add(new RSComponentListener(child)); if (child.getComponentStackSize() != 0) { for (final RSComponent component : child.getComponents()) { OldInterfaces.add(new RSComponentListener(component)); } } } } }