public void open(String stream,String quality){
  if (stream != null) {
    String url="twitch.tv/" + stream;
    if (!Helper.validateChannel(stream)) {
      url=stream;
    }
    Item existingItem=getExisitingItem(url,quality);
    if (existingItem != null) {
      existingItem.start();
      tabs.setSelectedComponent(existingItem);
    }
 else {
      Item newItem=new Item(url,quality,stream);
      tabs.add(StringUtil.shortenTo(stream,-20),newItem);
      tabs.setSelectedComponent(newItem);
      tabs.setToolTipTextAt(tabs.getSelectedIndex(),stream);
      newItem.start();
      pack();
    }
  }
  loadSettings();
  if (stream == null || quality == null || openDialog.isSelected()) {
    setLocationRelativeTo(parent);
    setVisible(true);
  }
}

public void open ( String stream , String quality ) { if ( stream != null ) { String url = "twitch.tv/" + stream ; if ( ! Helper . validateChannel ( stream ) ) { url = stream ; } Item existingItem = getExisitingItem ( url , quality ) ; if ( existingItem != null ) { existingItem . start ( ) ; tabs . setSelectedComponent ( existingItem ) ; } else { Item newItem = new Item ( url , quality , stream ) ; tabs . add ( StringUtil . shortenTo ( stream , - 20 ) , newItem ) ; tabs . setSelectedComponent ( newItem ) ; tabs . setToolTipTextAt ( tabs . getSelectedIndex ( ) , stream ) ; newItem . start ( ) ; pack ( ) ; } } loadSettings ( ) ; if ( stream == null || quality == null || openDialog . isSelected ( ) ) { setLocationRelativeTo ( parent ) ; setVisible ( true ) ; } }
opens the given stream and quality . shows the dialog depending on the settings and also loads the settings into the dialog .
