구글광고상단


[웹지연재]Google Web Toolkit 입문 - 4월,5월 연재(3회,4회)

현재 웹지에 연재하고 있는 GWT 3회 자료 입니다. 

연재 했던 프로젝트 파일을 업로드 합니다. 



공유하기 버튼

 

[FAQ:StatusBar]상태바 감추기/보이기

아이폰 개발시 항상 기본적으로 보이는 상태바 즉, 시간, 와이파이, 네트워크의 상태를 보여주는 바가 존재 한다. 해당 바를 없애는 방법이다.

 - 아래 보이는 이미지에는 상태바가 존재 한다.
- 해당 상태바를 삭제 하려면 아래의 코드를 삽입 하면 된다.
   앱의 AppDelegate.m이나 ViewController.m의 소스 코드에 아래와 같이 삽입 한다.

- (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions

{

    // Override point for customization after application launch.

    [[UIApplication sharedApplication] setStatusBarHidden:YES];

    

    self.window.rootViewController = self.viewController;

    [self.window makeKeyAndVisible];

    return YES;

}



- (void)viewDidLoad

{

    [super viewDidLoad];

    

    [[UIApplication sharedApplication] setStatusBarHidden:YES];

}


- 아래 보이는 이미지와 같이 상태바가 사라진 걸 볼 수 있다.

공유하기 버튼

 

[GXT-강좌]Button ㄴExt GWT

GXT에서 버튼에 관련된 강좌를 진행 합니다.

1. 버튼 생성
      Button button = new Button("버튼");

2. 버튼 클릭 이벤트 생성
button.addSelectionListener(new SelectionListener<ButtonEvent>(){
@Override
public void componentSelected(ButtonEvent ce) {
                        //동작 처리
}
});    

3. 버튼 Text 변경
      Button button = new Button("버튼");
      button.getText();
      button.setText("버튼입니다");

공유하기 버튼

 

[GXT-FAQ]Status 생성 ㄴExt GWT

1. ToolBar를 이용해서 컨테이너 하단에 Status Bar를 만들자. 


//툴바 생성.
ToolBar toolBar = new ToolBar();

//스테이터스 생성
Status status = new Status();

//폭 설정
status.setWidth(150);

//사각형으로 들어간 음영이 생기게 한다.
status.setBox(true);

//텍스트 표시
status.setText("OK");

//툴바에 추가
toolBar.add(status);

//해당 패널의 가장 하단에 추가.
setBottomComponent(toolBar);

공유하기 버튼

 

[GXT-FAQ]JDom.jar이용한 RSS형식 만들기 ㄴExt GWT

1. jdom.jar를 web-inf/lib 밑에 복사 한후 이클립스에서 빌드패스로 설정한다.


2. output 으로 나오는 XML 형태

<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0">
  <channel>
    <title>media4th</title>
    <description>web agency</description>
    <link>http://www.media4th.co.kr</link>
  </channel>
</rss>

3. 소스 코드

Element eleRoot = new Element("rss");
eleRoot.setAttribute(new Attribute("version", "2.0"));

Document document = new Document(eleRoot);

Element eleChannel = new Element("channel");
Element eleTitle = new Element("title");
Element eleDescription = new Element("description");
Element eleLink = new Element("link");

eleTitle.setText(feed.getTitle());
eleDescription.setText(feed.getDescription());
eleLink.setText(feed.getLink());

eleChannel.addContent(eleTitle);
eleChannel.addContent(eleDescription);
eleChannel.addContent(eleLink);

eleRoot.addContent(eleChannel);

try{
XMLOutputter serializer = new XMLOutputter();
Format prettyFormat = Format.getPrettyFormat();
serializer.setFormat(prettyFormat);
System.out.println("At this point we would serialize the feed " + feed.getTitle() + " to a file. For now we are just going to write it to the console.");
serializer.output(document, System.out);
}catch(IOException e){
System.out.println("Error saving feed");
}

공유하기 버튼

 

1 2 3 4 5 6 7 8 9 10 다음


구글광고수직

통계 위젯 (화이트)

064
316
49942