Package com.suwish.pc.ui.tab

Source Code of com.suwish.pc.ui.tab.UITabFactory

package com.suwish.pc.ui.tab;

import java.awt.Color;

import javax.swing.Icon;

import com.android.ddmlib.IDevice;
import com.suwish.pc.phone.PhoneManager;
import com.suwish.pc.ui.component.tab.UITabPanel;
import com.suwish.pc.ui.component.tab.UITabPanel.TabType;

/**
*
*
* @author Min
*
*/
public final class UITabFactory {

 
  public static UITabPanel createTabByDevice(IDevice device){
   
    return new DeviceTabPanel(PhoneManager.getInstance().getDdmsManager().getBridge(), device);
  }
 
 
  public static UITabPanel createDeviceTab(IDevice device){
    return new DeviceTabPanel(PhoneManager.getInstance().getDdmsManager().getBridge(), device);
  }
  public static UITabPanel create(Color color){
    return getTabPanel(color);
  }
 
  private static UITabPanel getTabPanel(Color clor){
    UITabPanel tab = new UITabPanel(){

      /**
       *
       */
      private static final long serialVersionUID = 1L;

      @Override
      public String getName() {
        // TODO Auto-generated method stub
        return "getName";
      }

      @Override
      public String getTip() {
        // TODO Auto-generated method stub
        return "getTip";
      }

      @Override
      public String getTitle() {
        return "getTitle";
      }

      @Override
      public Icon getIcon() {
        return null;
      }

      @Override
      public TabType getTabType() {
        return null;
      }

      @Override
      public boolean close() {
        // TODO Auto-generated method stub
        return true;
      }
     
    };
    tab.setBackground(clor);
    return tab;
  }
}
TOP

Related Classes of com.suwish.pc.ui.tab.UITabFactory

TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.