Package com.iizigo.panel
Class UIDevices
- All Implemented Interfaces:
Drawable
Predefined UI devices list, device helpers and composite.
- Author:
- Christopher Mindus
Field Summary
FieldsConstructor Summary
ConstructorsMethod Summary
Modifier and TypeMethodDescriptionstatic booleanShows a message box about no mobile devices, then creates a default list of all Apple devices.static booleanCreates a default list of Apple devices if none are present.voidDownloads a new device file.static Collection<GSimpleDevice>Gets the default devices.static Collection<GSimpleDevice>Get a list of all selected devices, sorted by names.static List<GSimpleDevice>getSortedSelectedDevices(boolean isMobile) Get a list of all selected devices, sorted by names.booleanSaves the selection in the workspace.validate()Validates the composite.Methods inherited from class org.eclipse.swt.widgets.Composite
changed, checkSubclass, computeSize, drawBackground, getBackgroundMode, getChildren, getLayout, getLayoutDeferred, getTabList, isLayoutDeferred, layout, layout, layout, layout, layout, redraw, setBackgroundMode, setFocus, setLayout, setLayoutDeferred, setTabList, toStringMethods inherited from class org.eclipse.swt.widgets.Scrollable
computeTrim, getClientArea, getHorizontalBar, getScrollbarsMode, getVerticalBarMethods inherited from class org.eclipse.swt.widgets.Control
addControlListener, addDragDetectListener, addFocusListener, addGestureListener, addHelpListener, addKeyListener, addMenuDetectListener, addMouseListener, addMouseMoveListener, addMouseTrackListener, addMouseWheelListener, addPaintListener, addTouchListener, addTraverseListener, computeSize, dragDetect, dragDetect, forceFocus, getAccessible, getBackground, getBackgroundImage, getBorderWidth, getBounds, getCursor, getDragDetect, getEnabled, getFont, getForeground, getLayoutData, getLocation, getMenu, getMonitor, getOrientation, getParent, getRegion, getShell, getSize, getTextDirection, getToolTipText, getTouchEnabled, getVisible, internal_dispose_GC, internal_new_GC, isEnabled, isFocusControl, isReparentable, isVisible, moveAbove, moveBelow, pack, pack, print, redraw, removeControlListener, removeDragDetectListener, removeFocusListener, removeGestureListener, removeHelpListener, removeKeyListener, removeMenuDetectListener, removeMouseListener, removeMouseMoveListener, removeMouseTrackListener, removeMouseWheelListener, removePaintListener, removeTouchListener, removeTraverseListener, requestLayout, setBackground, setBackgroundImage, setBounds, setBounds, setCapture, setCursor, setDragDetect, setEnabled, setFont, setForeground, setLayoutData, setLocation, setLocation, setMenu, setOrientation, setParent, setRedraw, setRegion, setSize, setSize, setTextDirection, setToolTipText, setTouchEnabled, setVisible, toControl, toControl, toDisplay, toDisplay, traverse, traverse, traverse, updateMethods inherited from class org.eclipse.swt.widgets.Widget
addDisposeListener, addListener, checkWidget, dispose, getData, getData, getDisplay, getListeners, getStyle, isAutoDirection, isDisposed, isListening, notifyListeners, removeDisposeListener, removeListener, removeListener, reskin, setData, setDataMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitMethods inherited from interface org.eclipse.swt.graphics.Drawable
isAutoScalable
Field Details
DEVICE_URL
The device URL.- See Also:
Constructor Details
UIDevices
public UIDevices(Composite parent, int marginLeft, int marginRight, int marginTop, int marginBottom, Runnable runnable) Constructor.The composite used a GridLayout of 2 columns.
- Parameters:
parent- The parent composite.marginLeft- Left margin.marginRight- Right margin.marginTop- Top margin.marginBottom- Bottom margin.runnable- Runnable called when selection changes.
Method Details
getDefaultDevices
Gets the default devices.getSelectedDevices
Get a list of all selected devices, sorted by names.createDefaultAppleDevices
public static boolean createDefaultAppleDevices()Creates a default list of Apple devices if none are present.- Returns:
- true if the default is created, false otherwise.
checkCreateDefaultMobileDevices
Shows a message box about no mobile devices, then creates a default list of all Apple devices.- Parameters:
shell- The shell for the message box.- Returns:
- false for nothing done, true if the defaults were created.
getSortedSelectedDevices
Get a list of all selected devices, sorted by names. If the list is empty and this is a mobile device, a default list is created with the Apple devices.- Parameters:
isMobile- Flag for mobile devices.
validate
Validates the composite.- Returns:
- null for OK, otherwise an error message.
saveSelection
public boolean saveSelection()Saves the selection in the workspace.- Returns:
- true for success, false for error.
downloadDeviceFile
Downloads a new device file.- Throws:
IOException