/** * Sets the input mechanism to use for this emulation profile. * * @param ime the IME to use * @return self-reference */ public Builder setIME(IME ime) { config.input = ime; return this; }
/** * Sets the user agent to use for this emulation profile. While {@link * com.opera.core.systems.EmulationProfile#getUserAgent()} returns a string, {@link * OperaMobileEmulation.UserAgent} provides a convenience enum of the supported user agent * strings in Opera Mobile. * * @param userAgent the user agent to use * @return self-reference */ public Builder setUserAgent(UserAgent userAgent) { config.userAgent = userAgent; return this; }
/** * Sets the pixel density of the device's screen. * * @param ppi the pixel density as an integer * @return self-reference */ public Builder setPPI(int ppi) { config.ppi = ppi; return this; }
/** * Sets the height of the screen emulation resolution. * * @param height the height of the screen * @return self-reference */ public Builder setHeight(int height) { setResolution(new Dimension(config.getResolution().getWidth(), height)); return this; }
/** * Sets the width of the screen emulation resolution. * * @param width the width of the screen * @return self-reference */ public Builder setWidth(int width) { setResolution(new Dimension(width, config.getResolution().getHeight())); return this; }
/** * Sets the resolution of the emulation profile to the given dimensions. * * @param resolution the dimensions of the screen * @return self-reference */ public Builder setResolution(Dimension resolution) { config.resolution = resolution; return this; }
/** * Sets this emulation profile's unique description. * * @param profileName a unique description of this profile * @return self-reference */ public Builder setProfileName(String profileName) { config.profileName = profileName; return this; }