In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-01-16 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Development >
Share
Shulou(Shulou.com)06/02 Report--
What are the two major functions of the Display class in J2ME, many novices are not very clear about this, in order to help you solve this problem, the following editor will explain in detail for you, people with this need can come to learn, I hope you can get something.
Do you understand the role of the Display class in J2ME? here is a brief introduction to you. Recently, you are writing a test tool, take a good look at J2ME's api, in which a very simple column is Display class, Display class summed up has two functions.
The role of the Display class in J2ME
Recently, I am writing a test tool, take a good look at J2ME's api, one of the very simple columns is the Display class, the only common ones are Display.getDisplay (midlet) and setCurrent (), but the Display class is very powerful.
To sum up, the Display class serves two purposes:
1. Get the properties of the screen. Color, supported color quantity information.
IsColor- determines whether the screen is in color.
NumColors- (if it is color) to get the phone, (if not color) to get the grayscale
2. Control the display of the screen. This is what we often use.
SetCurrent- sets the current display interface object
GetCurrent- gets the display interface object
CallSerially- is the specified thread object that is paused first, and then continues to execute after the display of the screen is finished.
MIDP2.0 has enhanced some functions since then.
NumAlphaLevels---- gets device support for transparency
GetBestImageHeight-- gets the height of pictures supported by the device *
GetBestImageWidth-- gets the width of the picture supported by the device.
GetBorderStyle-- gets the boundary format of the control
GetColor-- gets the default color in the advanced user interface
There are also background, foreground, background and foreground when highlighted, and so on.
FlashBacklight-- controls the flickering of mobile phone background lights
Vibrate-- controls mobile phone vibration
In addition, it is very useful to set flicker and vibration. For example, when we are developing a multimedia player, some mobile phones may stop playing when the screensaver appears. For such phones, you can turn on the background light to solve this problem.
Is it helpful for you to read the above content? If you want to know more about the relevant knowledge or read more related articles, please follow the industry information channel, thank you for your support.
Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.
Views: 0
*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.
Continue with the installation of the previous hadoop.First, install zookooper1. Decompress zookoope
"Every 5-10 years, there's a rare product, a really special, very unusual product that's the most un
© 2024 shulou.com SLNews company. All rights reserved.