![]() |
![]() |
sdkuilib16:52:19.674 INFO jd.cli.Main - Decompiling sdkuilib.jar package com.android.sdkuilib.ui; import org.eclipse.swt.layout.GridData; import org.eclipse.swt.widgets.Control; public final class GridDataBuilder { private GridData mGD; private GridDataBuilder() { mGD = new GridData(); } public static GridDataBuilder create(Control control) { GridDataBuilder gdh = new GridDataBuilder(); control.setLayoutData(mGD); return gdh; } public GridDataBuilder wHint(int w) { mGD.widthHint = w; return this; } public GridDataBuilder hHint(int h) { mGD.heightHint = h; return this; } public GridDataBuilder hIndent(int h) { mGD.horizontalIndent = h; return this; } public GridDataBuilder hSpan(int h) { mGD.horizontalSpan = h; return this; } public GridDataBuilder vSpan(int v) { mGD.verticalSpan = v; return this; } public GridDataBuilder hCenter() { mGD.horizontalAlignment = 16777216; return this; } public GridDataBuilder vCenter() { mGD.verticalAlignment = 16777216; return this; } public GridDataBuilder vTop() { mGD.verticalAlignment = 128; return this; } public GridDataBuilder vBottom() { mGD.verticalAlignment = 1024; return this; } public GridDataBuilder hLeft() { mGD.horizontalAlignment = 16384; return this; } public GridDataBuilder hRight() { mGD.horizontalAlignment = 131072; return this; } public GridDataBuilder hFill() { mGD.horizontalAlignment = 4; return this; } public GridDataBuilder vFill() { mGD.verticalAlignment = 4; return this; } public GridDataBuilder fill() { mGD.horizontalAlignment = 4; mGD.verticalAlignment = 4; return this; } public GridDataBuilder hGrab() { mGD.grabExcessHorizontalSpace = true; return this; } public GridDataBuilder vGrab() { mGD.grabExcessVerticalSpace = true; return this; } public GridDataBuilder grab() { mGD.grabExcessHorizontalSpace = true; mGD.grabExcessVerticalSpace = true; return this; } } /* Location: * Qualified Name: com.android.sdkuilib.ui.GridDataBuilder * Java Class Version: 6 (50.0) * JD-Core Version: 0.7.1 */ package com.android.sdkuilib.ui; import org.eclipse.swt.layout.GridLayout; import org.eclipse.swt.widgets.Composite; public final class GridLayoutBuilder { private GridLayout mGL; private GridLayoutBuilder() { mGL = new GridLayout(); } public static GridLayoutBuilder create(Composite parent) { GridLayoutBuilder glh = new GridLayoutBuilder(); parent.setLayout(mGL); return glh; } public GridLayoutBuilder noMargins() { mGL.marginHeight = 0; mGL.marginWidth = 0; mGL.marginLeft = 0; mGL.marginTop = 0; mGL.marginRight = 0; mGL.marginBottom = 0; return this; } public GridLayoutBuilder margins(int n) { mGL.marginHeight = n; mGL.marginWidth = n; mGL.marginLeft = n; mGL.marginTop = n; mGL.marginRight = n; mGL.marginBottom = n; return this; } public GridLayoutBuilder columns(int n) { mGL.numColumns = n; return this; } public GridLayoutBuilder columnsEqual() { mGL.makeColumnsEqualWidth = true; return this; } public GridLayoutBuilder vSpacing(int v) { mGL.verticalSpacing = v; return this; } public GridLayoutBuilder hSpacing(int h) { mGL.horizontalSpacing = h; return this; } public GridLayoutBuilder spacing(int s) { mGL.verticalSpacing = s; mGL.horizontalSpacing = s; return this; } } /* Location: * Qualified Name: com.android.sdkuilib.ui.GridLayoutBuilder * Java Class Version: 6 (50.0) * JD-Core Version: 0.7.1 */ package com.android.sdkuilib.ui; import org.eclipse.swt.events.DisposeEvent; import org.eclipse.swt.events.DisposeListener; class SwtBaseDialog$1 implements DisposeListener { SwtBaseDialog$1(SwtBaseDialog paramSwtBaseDialog) {} public void widgetDisposed(DisposeEvent e) { SwtBaseDialog.access$000(this$0); } } /* Location: * Qualified Name: com.android.sdkuilib.ui.SwtBaseDialog.1 * Java Class Version: 6 (50.0) * JD-Core Version: 0.7.1 */ package com.android.sdkuilib.ui; import org.eclipse.jface.dialogs.Dialog; import org.eclipse.swt.layout.GridData; import org.eclipse.swt.layout.GridLayout; import org.eclipse.swt.widgets.Composite; import org.eclipse.swt.widgets.Control; import org.eclipse.swt.widgets.Shell; public abstract class GridDialog extends Dialog { private final int mNumColumns; private final boolean mMakeColumnsEqualWidth; public GridDialog(Shell parentShell, int numColumns, boolean makeColumnsEqualWidth) { super(parentShell); mNumColumns = numColumns; mMakeColumnsEqualWidth = makeColumnsEqualWidth; } public abstract void createDialogContent(Composite paramComposite); protected Control createDialogArea(Composite parent) { Composite top = new Composite(parent, 0); GridLayout layout = new GridLayout(mNumColumns, mMakeColumnsEqualWidth); marginHeight = convertVerticalDLUsToPixels(7); marginWidth = convertHorizontalDLUsToPixels(7); verticalSpacing = convertVerticalDLUsToPixels(4); horizontalSpacing = convertHorizontalDLUsToPixels(4); top.setLayout(layout); top.setLayoutData(new GridData(1808)); createDialogContent(top); applyDialogFont(top); return top; } } /* Location: * Qualified Name: com.android.sdkuilib.ui.GridDialog * Java Class Version: 6 (50.0) * JD-Core Version: 0.7.1 */ package com.android.sdkuilib.ui; import org.eclipse.swt.events.ModifyEvent; import org.eclipse.swt.events.ModifyListener; import org.eclipse.swt.widgets.Text; class AuthenticationDialog$2 implements ModifyListener { AuthenticationDialog$2(AuthenticationDialog paramAuthenticationDialog) {} public void modifyText(ModifyEvent arg0) { AuthenticationDialog.access$202(AuthenticationDialog.access$300(this$0).getText()); } } /* Location: * Qualified Name: com.android.sdkuilib.ui.AuthenticationDialog.2 * Java Class Version: 6 (50.0) * JD-Core Version: 0.7.1 */ package com.android.sdkuilib.ui; import org.eclipse.swt.events.ModifyEvent; import org.eclipse.swt.events.ModifyListener; import org.eclipse.swt.widgets.Text; class AuthenticationDialog$1 implements ModifyListener { AuthenticationDialog$1(AuthenticationDialog paramAuthenticationDialog) {} public void modifyText(ModifyEvent arg0) { AuthenticationDialog.access$002(AuthenticationDialog.access$100(this$0).getText().trim()); } } /* Location: * Qualified Name: com.android.sdkuilib.ui.AuthenticationDialog.1 * Java Class Version: 6 (50.0) * JD-Core Version: 0.7.1 */ package com.android.sdkuilib.ui; import org.eclipse.swt.events.ModifyEvent; import org.eclipse.swt.events.ModifyListener; import org.eclipse.swt.widgets.Text; class AuthenticationDialog$4 implements ModifyListener { AuthenticationDialog$4(AuthenticationDialog paramAuthenticationDialog) {} public void modifyText(ModifyEvent arg0) { AuthenticationDialog.access$602(AuthenticationDialog.access$700(this$0).getText().trim()); } } /* Location: * Qualified Name: com.android.sdkuilib.ui.AuthenticationDialog.4 * Java Class Version: 6 (50.0) * JD-Core Version: 0.7.1 */ package com.android.sdkuilib.ui; import org.eclipse.swt.events.ModifyEvent; import org.eclipse.swt.events.ModifyListener; import org.eclipse.swt.widgets.Text; class AuthenticationDialog$3 implements ModifyListener { AuthenticationDialog$3(AuthenticationDialog paramAuthenticationDialog) {} public void modifyText(ModifyEvent arg0) { AuthenticationDialog.access$402(AuthenticationDialog.access$500(this$0).getText().trim()); } } /* Location: * Qualified Name: com.android.sdkuilib.ui.AuthenticationDialog.3 * Java Class Version: 6 (50.0) * JD-Core Version: 0.7.1 */ package com.android.sdkuilib.ui; import com.android.SdkConstants; import java.util.HashMap; import java.util.Map; import org.eclipse.swt.events.DisposeEvent; import org.eclipse.swt.events.DisposeListener; import org.eclipse.swt.graphics.Point; import org.eclipse.swt.graphics.Rectangle; import org.eclipse.swt.widgets.Dialog; import org.eclipse.swt.widgets.Display; import org.eclipse.swt.widgets.Shell; public abstract class SwtBaseDialog extends Dialog { private static final int MIN_Y = SdkConstants.CURRENT_PLATFORM == 3 ? 20 : 0; private static Map<Class<?>, Point> sLastSizeMap = new HashMap(); private volatile boolean mQuitRequested = false; private boolean mReturnValue; private Shell mShell; public SwtBaseDialog(Shell parent, int swtStyle, String title) { super(parent, swtStyle); if (title != null) { setText(title); } } public boolean open() { if (!mQuitRequested) { createShell(); } if (!mQuitRequested) { createContents(); } if (!mQuitRequested) { positionShell(); } if (!mQuitRequested) { postCreate(); } if (!mQuitRequested) { mShell.open(); mShell.layout(); eventLoop(); } return mReturnValue; } protected void createShell() { mShell = new Shell(getParent(), 67696); mShell.setMinimumSize(new Point(450, 300)); mShell.setSize(450, 300); if (getText() != null) { mShell.setText(getText()); } mShell.addDisposeListener(new DisposeListener() { public void widgetDisposed(DisposeEvent e) { SwtBaseDialog.this.saveSize(); } }); } protected abstract void createContents(); protected abstract void postCreate(); protected void eventLoop() { Display display = getParent().getDisplay(); while ((!mQuitRequested) && (!mShell.isDisposed())) { if (!display.readAndDispatch()) { display.sleep(); } } } protected boolean getReturnValue() { return mReturnValue; } protected void setReturnValue(boolean returnValue) { mReturnValue = returnValue; } protected Shell getShell() { return mShell; } protected void close() { if ((mShell != null) && (!mShell.isDisposed())) { saveSize(); getShell().close(); } mQuitRequested = true; } private void positionShell() { Shell child = mShell; Shell parent = getParent(); if ((child != null) && (parent != null)) { Rectangle parentArea = parent.getClientArea(); Point parentLoc = parent.getLocation(); int px = x; int py = y; int pw = width; int ph = height; Point childSize = (Point)sLastSizeMap.get(getClass()); if (childSize == null) { childSize = child.getSize(); } int cw = x; int ch = y; int x = px + (pw - cw) / 2; if (x < 0) { x = 0; } int y = py + (ph - ch) / 2; if (y < MIN_Y) { y = MIN_Y; } child.setLocation(x, y); child.setSize(cw, ch); } } private void saveSize() { if ((mShell != null) && (!mShell.isDisposed())) { sLastSizeMap.put(getClass(), mShell.getSize()); } } } /* Location: * Qualified Name: com.android.sdkuilib.ui.SwtBaseDialog * Java Class Version: 6 (50.0) * JD-Core Version: 0.7.1 */ package com.android.sdkuilib.ui; import org.eclipse.swt.events.ModifyEvent; import org.eclipse.swt.events.ModifyListener; import org.eclipse.swt.layout.GridData; import org.eclipse.swt.layout.GridLayout; import org.eclipse.swt.widgets.Composite; import org.eclipse.swt.widgets.Label; import org.eclipse.swt.widgets.Shell; import org.eclipse.swt.widgets.Text; public class AuthenticationDialog extends GridDialog { private Text mTxtLogin; private Text mTxtPassword; private Text mTxtWorkstation; private Text mTxtDomain; private String mTitle; private String mMessage; private static String sLogin = ""; private static String sPassword = ""; private static String sWorkstation = ""; private static String sDomain = ""; public AuthenticationDialog(Shell parentShell, String title, String message) { super(parentShell, 1, false); mTitle = title; mMessage = message; } public void createDialogContent(Composite parent) { getShell().setText(mTitle); GridData data = new GridData(4, 4, true, true); parent.setLayoutData(data); Composite upperComposite = new Composite(parent, 0); GridLayout layout = new GridLayout(2, false); verticalSpacing = 10; upperComposite.setLayout(layout); data = new GridData(4, 16777216, true, true); upperComposite.setLayoutData(data); Label lblMessage = new Label(upperComposite, 64); lblMessage.setText(mMessage); data = new GridData(4, 16777216, true, true, 2, 1); widthHint = 500; lblMessage.setLayoutData(data); Label lblUserName = new Label(upperComposite, 0); lblUserName.setText("Login:"); data = new GridData(16384, 16777216, false, false); lblUserName.setLayoutData(data); mTxtLogin = new Text(upperComposite, 2052); data = new GridData(4, 16777216, true, false); mTxtLogin.setLayoutData(data); mTxtLogin.setFocus(); mTxtLogin.setText(sLogin); mTxtLogin.addModifyListener(new ModifyListener() { public void modifyText(ModifyEvent arg0) { AuthenticationDialog.access$002(mTxtLogin.getText().trim()); } }); Label lblPassword = new Label(upperComposite, 0); lblPassword.setText("Password:"); data = new GridData(16384, 16777216, false, false); lblPassword.setLayoutData(data); mTxtPassword = new Text(upperComposite, 4196356); data = new GridData(4, 16777216, true, false); mTxtPassword.setLayoutData(data); mTxtPassword.setText(sPassword); mTxtPassword.addModifyListener(new ModifyListener() { public void modifyText(ModifyEvent arg0) { AuthenticationDialog.access$202(mTxtPassword.getText()); } }); Label lblInfo = new Label(upperComposite, 0); lblInfo.setText("Provide the following info if your proxy uses NTLM authentication. Leave blank otherwise."); data = new GridData(); horizontalSpan = 2; lblInfo.setLayoutData(data); Label lblWorkstation = new Label(upperComposite, 0); lblWorkstation.setText("Workstation:"); data = new GridData(16384, 16777216, false, false); lblWorkstation.setLayoutData(data); mTxtWorkstation = new Text(upperComposite, 2052); data = new GridData(4, 16777216, true, false); mTxtWorkstation.setLayoutData(data); mTxtWorkstation.setText(sWorkstation); mTxtWorkstation.addModifyListener(new ModifyListener() { public void modifyText(ModifyEvent arg0) { AuthenticationDialog.access$402(mTxtWorkstation.getText().trim()); } }); Label lblDomain = new Label(upperComposite, 0); lblDomain.setText("Domain:"); data = new GridData(16384, 16777216, false, false); lblDomain.setLayoutData(data); mTxtDomain = new Text(upperComposite, 2052); data = new GridData(4, 16777216, true, false); mTxtDomain.setLayoutData(data); mTxtDomain.setText(sDomain); mTxtDomain.addModifyListener(new ModifyListener() { public void modifyText(ModifyEvent arg0) { AuthenticationDialog.access$602(mTxtDomain.getText().trim()); } }); } public String getLogin() { return sLogin; } public String getPassword() { return sPassword; } public String getWorkstation() { return sWorkstation; } public String getDomain() { return sDomain; } } /* Location: * Qualified Name: com.android.sdkuilib.ui.AuthenticationDialog * Java Class Version: 6 (50.0) * JD-Core Version: 0.7.1 */ package com.android.sdkuilib.internal.widgets; import com.android.sdklib.internal.avd.AvdInfo; import com.android.sdklib.internal.avd.AvdManager; import com.android.sdklib.internal.avd.AvdManager.AvdConflict; import com.android.utils.Pair; import org.eclipse.swt.events.ModifyEvent; import org.eclipse.swt.events.ModifyListener; import org.eclipse.swt.widgets.Button; import org.eclipse.swt.widgets.Text; class LegacyAvdEditDialog$CreateNameModifyListener implements ModifyListener { private LegacyAvdEditDialog$CreateNameModifyListener(LegacyAvdEditDialog paramLegacyAvdEditDialog) {} public void modifyText(ModifyEvent e) { String name = LegacyAvdEditDialog.access$000(this$0).getText().trim(); if ((LegacyAvdEditDialog.access$100(this$0) == null) || (!name.equals(LegacyAvdEditDialog.access$100(this$0).getName()))) { Pair<AvdManager.AvdConflict, String> conflict = LegacyAvdEditDialog.access$200(this$0).isAvdNameConflicting(name); if (conflict.getFirst() != AvdManager.AvdConflict.NO_CONFLICT) { if (!LegacyAvdEditDialog.access$300(this$0).isEnabled()) { LegacyAvdEditDialog.access$300(this$0).setEnabled(true); LegacyAvdEditDialog.access$300(this$0).setSelection(false); } } else { LegacyAvdEditDialog.access$300(this$0).setEnabled(false); LegacyAvdEditDialog.access$300(this$0).setSelection(false); } } else { LegacyAvdEditDialog.access$300(this$0).setEnabled(false); LegacyAvdEditDialog.access$300(this$0).setSelection(false); } LegacyAvdEditDialog.access$400(this$0); } } /* Location: * Qualified Name: com.android.sdkuilib.internal.widgets.LegacyAvdEditDialog.CreateNameModifyListener * Java Class Version: 6 (50.0) * JD-Core Version: 0.7.1 */ package com.android.sdkuilib.internal.widgets; import org.eclipse.swt.events.SelectionAdapter; import org.eclipse.swt.events.SelectionEvent; class AvdSelector$8 extends SelectionAdapter { AvdSelector$8(AvdSelector paramAvdSelector) {} public void widgetSelected(SelectionEvent arg0) { this$0.refresh(true); } } /* Location: * Qualified Name: com.android.sdkuilib.internal.widgets.AvdSelector.8 * Java Class Version: 6 (50.0) * JD-Core Version: 0.7.1 */ package com.android.sdkuilib.internal.widgets; class AvdCreationDialog$9 {} /* Location: * Qualified Name: com.android.sdkuilib.internal.widgets.AvdCreationDialog.9 * Java Class Version: 6 (50.0) * JD-Core Version: 0.7.1 */ package com.android.sdkuilib.internal.widgets; import org.eclipse.swt.events.VerifyEvent; import org.eclipse.swt.events.VerifyListener; class AvdStartDialog$3 implements VerifyListener { AvdStartDialog$3(AvdStartDialog paramAvdStartDialog) {} public void verifyText(VerifyEvent event) { for (int i = 0; i < text.length(); i++) { char letter = text.charAt(i); if ((letter < '0') || (letter > '9')) { doit = false; return; } } } } /* Location: * Qualified Name: com.android.sdkuilib.internal.widgets.AvdStartDialog.3 * Java Class Version: 6 (50.0) * JD-Core Version: 0.7.1 */ package com.android.sdkuilib.internal.widgets; import org.eclipse.swt.events.SelectionAdapter; import org.eclipse.swt.events.SelectionEvent; class LegacyAvdEditDialog$7 extends SelectionAdapter { LegacyAvdEditDialog$7(LegacyAvdEditDialog paramLegacyAvdEditDialog) {} public void widgetSelected(SelectionEvent arg0) { LegacyAvdEditDialog.access$1400(this$0); } } /* Location: * Qualified Name: com.android.sdkuilib.internal.widgets.LegacyAvdEditDialog.7 * Java Class Version: 6 (50.0) * JD-Core Version: 0.7.1 */ package com.android.sdkuilib.internal.widgets; import org.eclipse.swt.events.SelectionAdapter; import org.eclipse.swt.events.SelectionEvent; import org.eclipse.swt.widgets.Button; class LegacyAvdEditDialog$6 extends SelectionAdapter { LegacyAvdEditDialog$6(LegacyAvdEditDialog paramLegacyAvdEditDialog) {} public void widgetSelected(SelectionEvent arg0) { boolean listMode = LegacyAvdEditDialog.access$1200(this$0).getSelection(); LegacyAvdEditDialog.access$1300(this$0, listMode); LegacyAvdEditDialog.access$400(this$0); } } /* Location: * Qualified Name: com.android.sdkuilib.internal.widgets.LegacyAvdEditDialog.6 * Java Class Version: 6 (50.0) * JD-Core Version: 0.7.1 */ package com.android.sdkuilib.internal.widgets; import org.eclipse.swt.custom.CLabel; import org.eclipse.swt.events.MouseEvent; import org.eclipse.swt.events.MouseListener; import org.eclipse.swt.events.MouseTrackListener; import org.eclipse.swt.graphics.Image; import org.eclipse.swt.widgets.Composite; import org.eclipse.swt.widgets.Event; public class ToggleButton extends CLabel { private Image[] mImage = new Image[2]; private String[] mTooltip = new String[2]; private boolean mMouseIn; private int mState = 0; public ToggleButton(Composite parent, int style, Image image1, Image image2, String tooltip1, String tooltip2) { super(parent, style); mImage[0] = image1; mImage[1] = image2; mTooltip[0] = tooltip1; mTooltip[1] = tooltip2; updateImageAndTooltip(); addMouseListener(new MouseListener() { public void mouseDown(MouseEvent e) {} public void mouseUp(MouseEvent e) { if ((mMouseIn) && (button == 1)) { notifyListeners(13, new Event()); } } public void mouseDoubleClick(MouseEvent e) { if ((mMouseIn) && (button == 1)) { notifyListeners(14, new Event()); } } }); addMouseTrackListener(new MouseTrackListener() { public void mouseExit(MouseEvent e) { if (mMouseIn) { mMouseIn = false; redraw(); } } public void mouseEnter(MouseEvent e) { if (!mMouseIn) { mMouseIn = true; redraw(); } } public void mouseHover(MouseEvent e) {} }); } public int getStyle() { int style = super.getStyle(); if (mMouseIn) { style |= 0x4; } return style; } public void setState(int state) { assert ((state == 0) || (state == 1)); mState = state; updateImageAndTooltip(); redraw(); } public int getState() { return mState; } protected void updateImageAndTooltip() { setImage(mImage[getState()]); setToolTipText(mTooltip[getState()]); } } /* Location: * Qualified Name: com.android.sdkuilib.internal.widgets.ToggleButton * Java Class Version: 6 (50.0) * JD-Core Version: 0.7.1 */ package com.android.sdkuilib.internal.widgets; import java.util.Map; import org.eclipse.jface.viewers.CellLabelProvider; import org.eclipse.jface.viewers.ViewerCell; class LegacyAvdEditDialog$13 extends CellLabelProvider { LegacyAvdEditDialog$13(LegacyAvdEditDialog paramLegacyAvdEditDialog) {} public void update(ViewerCell cell) { String value = (String)LegacyAvdEditDialog.access$1600(this$0).get(cell.getElement()); cell.setText(value != null ? value : ""); } } /* Location: * Qualified Name: com.android.sdkuilib.internal.widgets.LegacyAvdEditDialog.13 * Java Class Version: 6 (50.0) * JD-Core Version: 0.7.1 */ package com.android.sdkuilib.internal.widgets; import org.eclipse.swt.events.MouseEvent; import org.eclipse.swt.events.MouseListener; import org.eclipse.swt.widgets.Event; class ToggleButton$1 implements MouseListener { ToggleButton$1(ToggleButton paramToggleButton) {} public void mouseDown(MouseEvent e) {} public void mouseUp(MouseEvent e) { if ((ToggleButton.access$000(this$0)) && (button == 1)) { this$0.notifyListeners(13, new Event()); } } public void mouseDoubleClick(MouseEvent e) { if ((ToggleButton.access$000(this$0)) && (button == 1)) { this$0.notifyListeners(14, new Event()); } } } /* Location: * Qualified Name: com.android.sdkuilib.internal.widgets.ToggleButton.1 * Java Class Version: 6 (50.0) * JD-Core Version: 0.7.1 */ package com.android.sdkuilib.internal.widgets; import org.eclipse.swt.events.SelectionAdapter; import org.eclipse.swt.events.SelectionEvent; class AvdCreationDialog$2 extends SelectionAdapter { AvdCreationDialog$2(AvdCreationDialog paramAvdCreationDialog) {} public void widgetSelected(SelectionEvent arg0) { AvdCreationDialog.access$200(this$0); } } /* Location: * Qualified Name: com.android.sdkuilib.internal.widgets.AvdCreationDialog.2 * Java Class Version: 6 (50.0) * JD-Core Version: 0.7.1 */ package com.android.sdkuilib.internal.widgets; import org.eclipse.jface.viewers.ISelectionChangedListener; import org.eclipse.jface.viewers.SelectionChangedEvent; import org.eclipse.swt.widgets.Button; import org.eclipse.swt.widgets.Table; class LegacyAvdEditDialog$10 implements ISelectionChangedListener { LegacyAvdEditDialog$10(LegacyAvdEditDialog paramLegacyAvdEditDialog, Table paramTable) {} public void selectionChanged(SelectionChangedEvent event) { LegacyAvdEditDialog.access$1800(this$0).setEnabled(val$hardwareTable.getSelectionIndex() != -1); } } /* Location: * Qualified Name: com.android.sdkuilib.internal.widgets.LegacyAvdEditDialog.10 * Java Class Version: 6 (50.0) * JD-Core Version: 0.7.1 */ package com.android.sdkuilib.internal.widgets; import org.eclipse.swt.events.SelectionAdapter; import org.eclipse.swt.events.SelectionEvent; class LegacyAvdEditDialog$5 extends SelectionAdapter { LegacyAvdEditDialog$5(LegacyAvdEditDialog paramLegacyAvdEditDialog) {} public void widgetSelected(SelectionEvent arg0) { LegacyAvdEditDialog.access$1100(this$0); LegacyAvdEditDialog.access$400(this$0); } } /* Location: * Qualified Name: com.android.sdkuilib.internal.widgets.LegacyAvdEditDialog.5 * Java Class Version: 6 (50.0) * JD-Core Version: 0.7.1 */ package com.android.sdkuilib.internal.widgets; class LegacyAvdEditDialog$15 {} /* Location: * Qualified Name: com.android.sdkuilib.internal.widgets.LegacyAvdEditDialog.15 * Java Class Version: 6 (50.0) * JD-Core Version: 0.7.1 */ package com.android.sdkuilib.internal.widgets; import org.eclipse.swt.events.ModifyEvent; import org.eclipse.swt.events.ModifyListener; import org.eclipse.swt.events.SelectionAdapter; import org.eclipse.swt.events.SelectionEvent; class DeviceCreationDialog$ValidationListener extends SelectionAdapter implements ModifyListener { private DeviceCreationDialog$ValidationListener(DeviceCreationDialog paramDeviceCreationDialog) {} public void modifyText(ModifyEvent e) { DeviceCreationDialog.access$800(this$0); } public void widgetSelected(SelectionEvent e) { super.widgetSelected(e); DeviceCreationDialog.access$800(this$0); } } /* Location: * Qualified Name: com.android.sdkuilib.internal.widgets.DeviceCreationDialog.ValidationListener * Java Class Version: 6 (50.0) * JD-Core Version: 0.7.1 */ package com.android.sdkuilib.internal.widgets; import org.eclipse.swt.events.SelectionAdapter; import org.eclipse.swt.events.SelectionEvent; import org.eclipse.swt.widgets.Button; class AvdStartDialog$7 extends SelectionAdapter { AvdStartDialog$7(AvdStartDialog paramAvdStartDialog, Button paramButton) {} public void widgetSelected(SelectionEvent arg0) { AvdStartDialog.access$702(this$0, val$wipeButton.getSelection()); AvdStartDialog.access$800(this$0); } } /* Location: * Qualified Name: com.android.sdkuilib.internal.widgets.AvdStartDialog.7 * Java Class Version: 6 (50.0) * JD-Core Version: 0.7.1 */ package com.android.sdkuilib.internal.widgets; import com.android.sdklib.internal.avd.AvdInfo; import java.util.Comparator; class AvdSelector$12 implements Comparator<AvdInfo> { AvdSelector$12(AvdSelector paramAvdSelector) {} public int compare(AvdInfo o1, AvdInfo o2) { return o1.compareTo(o2); } } /* Location: * Qualified Name: com.android.sdkuilib.internal.widgets.AvdSelector.12 * Java Class Version: 6 (50.0) * JD-Core Version: 0.7.1 */ package com.android.sdkuilib.internal.widgets; import com.android.sdklib.internal.avd.AvdInfo; import org.eclipse.jface.dialogs.MessageDialog; import org.eclipse.swt.widgets.Display; import org.eclipse.swt.widgets.Shell; class AvdSelector$13 implements Runnable { AvdSelector$13(AvdSelector paramAvdSelector, Display paramDisplay, AvdInfo paramAvdInfo) {} public void run() { Shell shell = val$display.getActiveShell(); MessageDialog.openError(shell, "Delete Android Virtual Device", String.format("The Android Virtual Device '%1$s' is currently running in an emulator and cannot be deleted.", new Object[] { val$avdInfo.getName() })); } } /* Location: * Qualified Name: com.android.sdkuilib.internal.widgets.AvdSelector.13 * Java Class Version: 6 (50.0) * JD-Core Version: 0.7.1 */ package com.android.sdkuilib.internal.widgets; import org.eclipse.swt.events.SelectionAdapter; import org.eclipse.swt.events.SelectionEvent; class DeviceCreationDialog$NavStateListener extends SelectionAdapter { private DeviceCreationDialog$NavStateListener(DeviceCreationDialog paramDeviceCreationDialog) {} public void widgetSelected(SelectionEvent event) { super.widgetSelected(event); DeviceCreationDialog.access$1900(this$0); DeviceCreationDialog.access$800(this$0); } } /* Location: * Qualified Name: com.android.sdkuilib.internal.widgets.DeviceCreationDialog.NavStateListener * Java Class Version: 6 (50.0) * JD-Core Version: 0.7.1 */ package com.android.sdkuilib.internal.widgets; import com.android.sdklib.IAndroidTarget; import com.android.sdklib.internal.avd.AvdInfo; final class AvdSelector$TargetBasedFilter implements AvdSelector.IAvdFilter { private final IAndroidTarget mTarget; AvdSelector$TargetBasedFilter(IAndroidTarget target) { mTarget = target; } public void prepare() {} public boolean accept(AvdInfo avd) { if (avd != null) { return mTarget.canRunOn(avd.getTarget()); } return false; } public void cleanup() {} } /* Location: * Qualified Name: com.android.sdkuilib.internal.widgets.AvdSelector.TargetBasedFilter * Java Class Version: 6 (50.0) * JD-Core Version: 0.7.1 */ package com.android.sdkuilib.internal.widgets; enum AvdCreationDialog$SkinType { DYNAMIC, NONE, FROM_TARGET; private AvdCreationDialog$SkinType() {} } /* Location: * Qualified Name: com.android.sdkuilib.internal.widgets.AvdCreationDialog.SkinType * Java Class Version: 6 (50.0) * JD-Core Version: 0.7.1 */ package com.android.sdkuilib.internal.widgets; import org.eclipse.swt.events.ModifyEvent; import org.eclipse.swt.events.ModifyListener; import org.eclipse.swt.events.SelectionAdapter; import org.eclipse.swt.events.SelectionEvent; class LegacyAvdEditDialog$ValidateListener extends SelectionAdapter implements ModifyListener { private LegacyAvdEditDialog$ValidateListener(LegacyAvdEditDialog paramLegacyAvdEditDialog) {} public void modifyText(ModifyEvent e) { LegacyAvdEditDialog.access$400(this$0); } public void widgetSelected(SelectionEvent e) { super.widgetSelected(e); LegacyAvdEditDialog.access$400(this$0); } } /* Location: * Qualified Name: com.android.sdkuilib.internal.widgets.LegacyAvdEditDialog.ValidateListener * Java Class Version: 6 (50.0) * JD-Core Version: 0.7.1 */ package com.android.sdkuilib.internal.widgets; import com.android.SdkConstants; import com.android.io.FileWrapper; import com.android.prefs.AndroidLocation.AndroidLocationException; import com.android.sdklib.AndroidVersion; import com.android.sdklib.IAndroidTarget; import com.android.sdklib.ISystemImage; import com.android.sdklib.SdkManager; import com.android.sdklib.SystemImage; import com.android.sdklib.internal.avd.AvdInfo; import com.android.sdklib.internal.avd.AvdManager; import com.android.sdklib.internal.avd.AvdManager.AvdConflict; import com.android.sdklib.internal.avd.HardwareProperties; import com.android.sdklib.internal.avd.HardwareProperties.HardwareProperty; import com.android.sdklib.internal.project.ProjectProperties; import com.android.sdklib.repository.descriptors.IdDisplay; import com.android.sdkuilib.internal.repository.icons.ImageFactory; import com.android.sdkuilib.ui.GridDialog; import com.android.utils.ILogger; import com.android.utils.Pair; import java.io.File; import java.util.ArrayList; import java.util.HashMap; import java.util.Map; import java.util.Map.Entry; import java.util.Set; import java.util.TreeMap; import java.util.regex.Matcher; import java.util.regex.Pattern; import org.eclipse.jface.viewers.CellEditor; import org.eclipse.jface.viewers.CellLabelProvider; import org.eclipse.jface.viewers.ColumnViewer; import org.eclipse.jface.viewers.ComboBoxCellEditor; import org.eclipse.jface.viewers.EditingSupport; import org.eclipse.jface.viewers.ISelection; import org.eclipse.jface.viewers.ISelectionChangedListener; import org.eclipse.jface.viewers.IStructuredContentProvider; import org.eclipse.jface.viewers.IStructuredSelection; import org.eclipse.jface.viewers.SelectionChangedEvent; import org.eclipse.jface.viewers.TableViewer; import org.eclipse.jface.viewers.TableViewerColumn; import org.eclipse.jface.viewers.TextCellEditor; import org.eclipse.jface.viewers.Viewer; import org.eclipse.jface.viewers.ViewerCell; import org.eclipse.swt.events.ModifyEvent; import org.eclipse.swt.events.ModifyListener; import org.eclipse.swt.events.SelectionAdapter; import org.eclipse.swt.events.SelectionEvent; import org.eclipse.swt.events.VerifyEvent; import org.eclipse.swt.events.VerifyListener; import org.eclipse.swt.graphics.Point; import org.eclipse.swt.layout.GridData; import org.eclipse.swt.layout.GridLayout; import org.eclipse.swt.widgets.Button; import org.eclipse.swt.widgets.Combo; import org.eclipse.swt.widgets.Composite; import org.eclipse.swt.widgets.Control; import org.eclipse.swt.widgets.FileDialog; import org.eclipse.swt.widgets.Group; import org.eclipse.swt.widgets.Label; import org.eclipse.swt.widgets.Shell; import org.eclipse.swt.widgets.Table; import org.eclipse.swt.widgets.TableColumn; import org.eclipse.swt.widgets.Text; /** * @deprecated */ final class LegacyAvdEditDialog extends GridDialog { private static final String ABI_SYS_IMG_DATA_KEY = "systemImagesData"; private final AvdManager mAvdManager; private final TreeMap<String, IAndroidTarget> mCurrentTargets = new TreeMap(); private final Map<String, HardwareProperties.HardwareProperty> mHardwareMap; private final Map<String, String> mProperties = new HashMap(); private final ArrayList<String> mEditedProperties = new ArrayList(); private final ImageFactory mImageFactory; private final ILogger mSdkLog; private final AvdInfo mEditAvdInfo; private Text mAvdName; private Combo mTargetCombo; private Combo mTagAbiCombo; private String mAbiType; private Button mSdCardSizeRadio; private Text mSdCardSize; private Combo mSdCardSizeCombo; private Text mSdCardFile; private Button mBrowseSdCard; private Button mSdCardFileRadio; private Button mSnapshotCheck; private Button mSkinListRadio; private Combo mSkinCombo; private Button mSkinSizeRadio; private Text mSkinSizeWidth; private Text mSkinSizeHeight; private TableViewer mHardwareViewer; private Button mDeleteHardwareProp; private Button mForceCreation; private Button mOkButton; private Label mStatusIcon; private Label mStatusLabel; private Composite mStatusComposite; private final VerifyListener mDigitVerifier = new VerifyListener() { public void verifyText(VerifyEvent event) { int count = text.length(); for (int i = 0; i < count; i++) { char c = text.charAt(i); if ((c < '0') || (c > '9')) { doit = false; return; } } } }; private class CreateNameModifyListener implements ModifyListener { private CreateNameModifyListener() {} public void modifyText(ModifyEvent e) { String name = mAvdName.getText().trim(); if ((mEditAvdInfo == null) || (!name.equals(mEditAvdInfo.getName()))) { Pair<AvdManager.AvdConflict, String> conflict = mAvdManager.isAvdNameConflicting(name); if (conflict.getFirst() != AvdManager.AvdConflict.NO_CONFLICT) { if (!mForceCreation.isEnabled()) { mForceCreation.setEnabled(true); mForceCreation.setSelection(false); } } else { mForceCreation.setEnabled(false); mForceCreation.setSelection(false); } } else { mForceCreation.setEnabled(false); mForceCreation.setSelection(false); } LegacyAvdEditDialog.this.validatePage(); } } private class ValidateListener extends SelectionAdapter implements ModifyListener { private ValidateListener() {} public void modifyText(ModifyEvent e) { LegacyAvdEditDialog.this.validatePage(); } public void widgetSelected(SelectionEvent e) { super.widgetSelected(e); LegacyAvdEditDialog.this.validatePage(); } } protected LegacyAvdEditDialog(Shell parentShell, AvdManager avdManager, ImageFactory imageFactory, ILogger log, AvdInfo editAvdInfo) { super(parentShell, 2, false); mAvdManager = avdManager; mImageFactory = imageFactory; mSdkLog = log; mEditAvdInfo = editAvdInfo; File hardwareDefs = null; SdkManager sdkMan = avdManager.getSdkManager(); if (sdkMan != null) { String sdkPath = sdkMan.getLocation(); if (sdkPath != null) { hardwareDefs = new File(sdkPath + File.separator + SdkConstants.OS_SDK_TOOLS_LIB_FOLDER, "hardware-properties.ini"); } } if (hardwareDefs == null) { log.error(null, "Failed to load file %s from SDK", new Object[] { "hardware-properties.ini" }); mHardwareMap = new HashMap(); } else { mHardwareMap = HardwareProperties.parseHardwareDefinitions(hardwareDefs, null); } } public void create() { super.create(); Point p = getShell().getSize(); if (x < 400) { x = 400; } getShell().setSize(p); } protected Control createContents(Composite parent) { Control control = super.createContents(parent); getShell().setText(mEditAvdInfo == null ? "Create new Android Virtual Device (AVD)" : "Edit Android Virtual Device (AVD)"); mOkButton = getButton(0); fillExistingAvdInfo(); validatePage(); return control; } public void createDialogContent(final Composite parent) { Label label = new Label(parent, 0); label.setText("Name:"); String tooltip = "Name of the new Android Virtual Device"; label.setToolTipText(tooltip); mAvdName = new Text(parent, 2048); mAvdName.setLayoutData(new GridData(768)); mAvdName.addModifyListener(new CreateNameModifyListener(null)); mAvdName.setToolTipText(tooltip); label = new Label(parent, 0); label.setText("Target:"); tooltip = "The version of Android to use in the virtual device"; label.setToolTipText(tooltip); mTargetCombo = new Combo(parent, 12); mTargetCombo.setLayoutData(new GridData(768)); mTargetCombo.setToolTipText(tooltip); mTargetCombo.addSelectionListener(new SelectionAdapter() { public void widgetSelected(SelectionEvent e) { super.widgetSelected(e); LegacyAvdEditDialog.this.reloadSkinCombo(); LegacyAvdEditDialog.this.reloadTagAbiCombo(); LegacyAvdEditDialog.this. Further reading...For more information on Java 1.5 Tiger, you may find Java 1.5 Tiger, A developer's Notebook by D. Flanagan and B. McLaughlin from O'Reilly of interest.New!JAR listings
|