Code/Resource
Windows Develop
Linux-Unix program
Internet-Socket-Network
Web Server
Browser Client
Ftp Server
Ftp Client
Browser Plugins
Proxy Server
Email Server
Email Client
WEB Mail
Firewall-Security
Telnet Server
Telnet Client
ICQ-IM-Chat
Search Engine
Sniffer Package capture
Remote Control
xml-soap-webservice
P2P
WEB(ASP,PHP,...)
TCP/IP Stack
SNMP
Grid Computing
SilverLight
DNS
Cluster Service
Network Security
Communication-Mobile
Game Program
Editor
Multimedia program
Graph program
Compiler program
Compress-Decompress algrithms
Crypt_Decrypt algrithms
Mathimatics-Numerical algorithms
MultiLanguage
Disk/Storage
Java Develop
assembly language
Applications
Other systems
Database system
Embeded-SCM Develop
FlashMX/Flex
source in ebook
Delphi VCL
OS Develop
MiddleWare
MPI
MacOS develop
LabView
ELanguage
Software/Tools
E-Books
Artical/Document
UiAlert.java
Package: src.zip [view]
Upload User: luxiaowei
Upload Date: 2022-06-06
Package Size: 58k
Code Size: 2k
Category:
J2ME
Development Platform:
Java
- /*
- * To change this template, choose Tools | Templates
- * and open the template in the editor.
- */
- package com.framework;
- import javax.microedition.lcdui.Graphics;
- /**
- *
- * @author Swaroop Kumar
- */
- public class UiAlert extends UiDisplayble{
- protected TitleBar titleBar;
- private SoftkeyBar softkeybar;
- ScrollableContainer container;
- TextControl textControl;
- public UiAlert(String text,GTantra font,int align) {
- container = new ScrollableContainer();
- container.setWidth(DisplayManager.getInst().getWidth());
- textControl = new TextControl(text, DisplayManager.getInst().getWidth(), font,align , false);
- if(textControl.getHeight() < DisplayManager.getInst().getHeight() >> 3)
- {
- textControl.setHeight(DisplayManager.getInst().getHeight() >> 3);
- }
- container.addChildren(textControl);
- titleBar = getTitleBar();
- softkeybar = getSoftkeybar();
- softkeybar.invalidate();
- titleBar.invalidate();
- invalidate();
- setTransitionEffect(TransitionEffect.TRANSITION_BOTTOM_TO_TOP);
- }
- public void invalidate() {
- getBody().setHeight(textControl.getHeight());
- getBody().setPosition(0, DisplayManager.getInst().getHeight() - getSoftkeybar().getHeight() - textControl.getHeight());
- getTitleBar().setY(getBody().getY() - getTitleBar().getHeight());
- DisplayManager.getInst().invalidate();
- }
- public SoftkeyBar getSoftkeybar() {
- if(softkeybar == null)
- {
- softkeybar = new SoftkeyBar(this);
- }
- return softkeybar;
- }
- public void paintUI(Graphics g) {
- super.paintUI(g);
- }
- public TitleBar getTitleBar() {
- if(titleBar == null)
- {
- titleBar = new TitleBar(this);
- }
- return titleBar;
- }
- public ScrollableContainer getBody() {
- return container;
- }
- }