javax.microedition.media.Control Java Examples
The following examples show how to use
javax.microedition.media.Control.
You can vote up the ones you like or vote down the ones you don't like,
and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example #1
Source File: AbstractDirectControllable.java From pluotsorbet with GNU General Public License v2.0 | 6 votes |
private Control createControl( String type ) { int control_peer = getControlPeer( type ); if( control_peer == 0 ) { return null; } Control c = DirectAMMSControl.createDirectAMMSControl( type, control_peer ); if( c != null ) { _hControls.put( type, c ); } return c; }
Example #2
Source File: BasicMediaProcessor.java From pluotsorbet with GNU General Public License v2.0 | 6 votes |
public Control getControl(String controlType) { if (controlType == null) throw new IllegalArgumentException("Invalid control type"); /* Currently, the specification say, that controls may be get in unrealized state, but in the proposals for JSR 234 (N20) suggested to forbid it. */ /* if (state == UNREALIZED) throw new IllegalStateException("Invalid state: " + state);*/ // Prepend the package name if the type given does not // have the package prefix. String type = (controlType.indexOf('.') < 0) ? ("javax.microedition.media.control." + controlType) : controlType; for (int i = 0; i < controlNames.length; i++) if (type.equals(controlNames[i])) return controls[i]; return null; }
Example #3
Source File: BasicMediaProcessor.java From pluotsorbet with GNU General Public License v2.0 | 6 votes |
/** * Public constructor. * * @param allCtrls acceptable controls lists. * */ public BasicMediaProcessor() { this.controlNames = new String[0]; this.controls = new Control[0]; mediaProcessorID = 0; synchronized (idLock) { mediaProcessorID = (curID + 1) & 32767; curID = mediaProcessorID; } mprocessors.put(new Integer(mediaProcessorID), this); listeners = new Vector(); inputStream = null; outputStream = null; state = UNREALIZED; }
Example #4
Source File: AbstractDirectControllable.java From pluotsorbet with GNU General Public License v2.0 | 5 votes |
public final Control getControl( String controlType ) { if (controlType == null) throw new IllegalArgumentException(); String type; // Prepend the package name if the type given does not // have the package prefix. if (controlType.indexOf('.') < 0) { type = "javax.microedition.media.control." + controlType; } else { type = controlType; } Control c; if( ( c = ( Control )_hControls.get( type ) ) != null ) { return c; } if( _aControls != null ) { return null; } return createControl( type ); }
Example #5
Source File: AbstractDirectControllable.java From pluotsorbet with GNU General Public License v2.0 | 5 votes |
public final Control [] getControls() { if( _aControls != null ) { return _aControls; } String[] names = getSupportedControlNames(); _aControls = new Control [ names.length ]; for( int i = 0; i < names.length; i++ ) { System.out.println( "AK debug: the control " + names [i] + " was declared as supported" ); System.out.flush(); _aControls[ i ] = ( Control )_hControls.get( names[ i ] ); if( _aControls[ i ] == null ) { _aControls[ i ] = createControl( names[ i ] ); } if( _aControls[ i ] == null ) { throw new RuntimeException( "Failed to find native implementation of " + names[ i ] + " which was declared to be supported" ); } } return _aControls; }
Example #6
Source File: BasicMediaProcessor.java From pluotsorbet with GNU General Public License v2.0 | 5 votes |
public Control[] getControls() { /* Currently, the specification say, that controls may be get in unrealized state, but in the proposals for JSR 234 (N20) suggested to forbid it. */ /* if (state == UNREALIZED) throw new IllegalStateException("Invalid state: " + state);*/ Control[] result = new Control[controls.length]; System.arraycopy(controls, 0, result, 0, controls.length); return result; }
Example #7
Source File: AdvancedMultimediaManager.java From CodenameOne with GNU General Public License v2.0 | 5 votes |
private static Control getControl(Controllable player, String fullName) { Control control = player.getControl(fullName); if (control == null) { String shortName = fullName.substring(fullName.lastIndexOf('.') + 1); control = player.getControl(shortName); } return control; }
Example #8
Source File: AdvancedMultimediaManager.java From CodenameOne with GNU General Public License v2.0 | 5 votes |
private static Control getControl(Controllable player, String fullName) { Control control = player.getControl(fullName); if (control == null) { String shortName = fullName.substring(fullName.lastIndexOf('.') + 1); control = player.getControl(shortName); } return control; }
Example #9
Source File: Jsr234Proxy.java From pluotsorbet with GNU General Public License v2.0 | 4 votes |
public Control getCameraControl( DirectCamera cam ) { return null; }
Example #10
Source File: Spectator.java From pluotsorbet with GNU General Public License v2.0 | 4 votes |
public Control[] getControls() { return _impl.getControls(); }
Example #11
Source File: Jsr234Proxy.java From pluotsorbet with GNU General Public License v2.0 | 4 votes |
public Control getExposureControl( DirectPlayer p ) { return null; }
Example #12
Source File: Jsr234Proxy.java From pluotsorbet with GNU General Public License v2.0 | 4 votes |
public Control getFlashControl( DirectPlayer p ) { return null; }
Example #13
Source File: Jsr234Proxy.java From pluotsorbet with GNU General Public License v2.0 | 4 votes |
public Control getFocusControl( DirectCamera cam ) { return null; }
Example #14
Source File: Jsr234Proxy.java From pluotsorbet with GNU General Public License v2.0 | 4 votes |
public Control getSnapshotControl( DirectCamera cam ) { return null; }
Example #15
Source File: Jsr234Proxy.java From pluotsorbet with GNU General Public License v2.0 | 4 votes |
public Control getZoomControl( DirectPlayer p ) { return null; }
Example #16
Source File: Jsr234Proxy.java From pluotsorbet with GNU General Public License v2.0 | 4 votes |
public Control getImageFormatControl( DirectCamera cam ) { return null; }
Example #17
Source File: DirectCamera.java From pluotsorbet with GNU General Public License v2.0 | 4 votes |
protected Control doGetControl(String type) { Control c = super.doGetControl(type); if (c == null) { if (type.startsWith(JSR234_CAMERA_PACKAGE_NAME)) { String camType = type.substring( JSR234_CAMERA_PACKAGE_NAME.length() ); if( camType.equals( "CameraControl" ) ) { if( null == _cameraControl ) { _cameraControl = Jsr234Proxy.getInstance().getCameraControl( this ); } return _cameraControl; } else if( camType.equals( "ExposureControl" ) ) { if( null == _exposureControl ) { _exposureControl = Jsr234Proxy.getInstance().getExposureControl( this ); } return _exposureControl; } else if ( camType.equals( "FlashControl" ) ) { if( null == _flashControl ) { _flashControl = Jsr234Proxy.getInstance().getFlashControl( this ); } return _flashControl; } else if( camType.equals( "FocusControl" ) ) { if( null == _focusControl ) { _focusControl = Jsr234Proxy.getInstance().getFocusControl( this ); } return _focusControl; } else if( camType.equals( "SnapshotControl" ) ) { if( null == _snapshotControl ) { _snapshotControl = Jsr234Proxy.getInstance().getSnapshotControl( this ); } return _snapshotControl; } else if( camType.equals( "ZoomControl" ) ) { if( null == _zoomControl ) { _zoomControl = Jsr234Proxy.getInstance().getZoomControl( this ); } return _zoomControl; } } else if (type.equals( "javax.microedition.amms.control.ImageFormatControl" )) { if( null == _imgFmtControl ) { _imgFmtControl = Jsr234Proxy.getInstance().getImageFormatControl( this ); } return _imgFmtControl; } } return c; }
Example #18
Source File: MIDPVideoRenderer.java From pluotsorbet with GNU General Public License v2.0 | 4 votes |
public Control getVideoControl() { return this; }
Example #19
Source File: GlobalManager.java From pluotsorbet with GNU General Public License v2.0 | 4 votes |
public static Control[] getControls() { return GlobalMgrImpl.getInstance().getControls(); }
Example #20
Source File: GlobalManager.java From pluotsorbet with GNU General Public License v2.0 | 4 votes |
public static Control getControl(String controlType) { return GlobalMgrImpl.getInstance().getControl( controlType ); }
Example #21
Source File: Spectator.java From pluotsorbet with GNU General Public License v2.0 | 4 votes |
public Control getControl(String controlType) { return _impl.getControl( controlType ); }
Example #22
Source File: Jsr234Proxy.java From pluotsorbet with GNU General Public License v2.0 | 4 votes |
public Control getTunerControl( DirectPlayer p ) { return null; }
Example #23
Source File: Jsr234Proxy.java From pluotsorbet with GNU General Public License v2.0 | 4 votes |
public Control getRDSControl( DirectPlayer p ) { return null; }
Example #24
Source File: BasicMediaProcessor.java From pluotsorbet with GNU General Public License v2.0 | 4 votes |
protected void setControls(Control[] controls, String[] controlNames) { this.controls = controls; this.controlNames = controlNames; }
Example #25
Source File: DataSource.java From J2ME-Loader with Apache License 2.0 | 4 votes |
@Override public abstract Control getControl(String control);
Example #26
Source File: DataSource.java From J2ME-Loader with Apache License 2.0 | 4 votes |
@Override public abstract Control[] getControls();
Example #27
Source File: BaseModule.java From J2ME-Loader with Apache License 2.0 | 4 votes |
@Override public Control[] getControls() { return new Control[0]; }
Example #28
Source File: BaseModule.java From J2ME-Loader with Apache License 2.0 | 4 votes |
@Override public Control getControl(String controlType) { return null; }
Example #29
Source File: Spectator.java From J2ME-Loader with Apache License 2.0 | 4 votes |
public Control[] getControls() { return null; }
Example #30
Source File: Spectator.java From J2ME-Loader with Apache License 2.0 | 4 votes |
public Control getControl(java.lang.String aControlType) { return null; }