반응형

 
아직도 .NET Framework만 사용하고 계십니까? 그것의 빈자리를 채워줄 수많은 .NET용 무료 Framework들이 공개되었습니다. 수많은 Pattern & Practice 팀의 Application Block들 .NET의 유명한 OpenSource 프로젝트인 Castle을 인도하고 있던 Hamilton Verissimo가 Microsoft에 조인하게
됨으로써, 조만간 .NET도 Java처럼 Framework의 홍수시대를 맞이하고 있습니다.

또한 Framework의 중요성을 생산성 향상을 위해 필수적인 프로젝트의 기반 요소가 되었습니다.
이번 Framework’s Day를 통해서 Framework가 무엇인지 그리고 Framework 설계 방법과 유명한
무료 Framework들을 여러분에게 소개함으로써 이론적 배경과 활용 방법을 얻는 세미나를 Devpia의 Eva팀, Microsoft MVP들과 함께 준비했습니다.
주 제  Framework’s Day
개최일시  2008년 11월 29일 10:00~17:00
장소  한국소프트웨어진흥원 5층 교육장
참가대상  Wannabe 아키텍트, 소프트웨어 설계에 관심이 많은 분들
내용수준  Framework 설계와 사용에 관심이 많은 분들
가 격  무료
시 간 Session 강 좌 제 목
10:00 ~ 10:50 50분 Session 1  Evolving Framework (김용현)
11:00 ~ 11:50 50분 Session 2  Framework Engineering (손영수)
12:00 ~ 12:50 50분 점심시간
13:00 ~ 13:50 50분 Session 3  Application과 Framework 동시 구축하기 (고상원)
14:00 ~ 14:50 50분 Session 4  ASP.NET MVC Framework (장현희)
15:00 ~ 15:50 50분 Session 5  Data Entity Framework (한용희)
16:00 ~ 16:50 50분 Session 6  Spring.NET과 iBatis.NET (권효중)
  * 각 섹션의 쉬는 시간은 유연성 있게 조절합니다.
Evolving Framework
프레임워크를 만드는 것은 막연히 어렵게 느껴지지만, 막상 코드를 개발하다 보면 그리 어렵지 않게 만들 수 있을 것 같다는 느낌을 받곤 합니다. 코딩과정에서 공통적인 부분을 별도로 끌어 내어 관리 하는 것은 그리 어렵지 않습니다. 아마도 어렵다고 느껴지는 건 끌어낸 공통 코드를 앞으로 어떤 방향으로 조직하고 어떤 구조로 어떻게 발전시킬지 정하기가 어렵기 때문일 겁니다.
프레임워크란 무엇인지에 대해서 생각해 보고 좋은 프레임워크를 만들기 위해 어떤 식으로 발전시켜 나갈 것 인가에 대하여 소개합니다.
김 용 현  이스트소프트 알약개발팀장
- 데브피아 아키텍쳐 시삽
- 데브피아 아키텍쳐 스터디 팀 Eva 소속
- Microsoft MVP
 
Framework Engineering
Framework을 구축하기 위해 우리에게 필요한 공학적 기법들은 어떠한 것이 있을까요?
.NET Framework의 설계자인 Krzysztof Cwalina의 실제 경험을 공유해 드립니다. 이 세션을 통해 Framework를 잘 설계하기 위한 여러 가지 설계 가이드라인들과 툴들을 소개 드립니다.
손 영 수  데브피아 아키텍쳐 시삽
- 데브피아 아키텍쳐 시삽 (Eva 리더), Microsoft MVP
- 아키텍트 블로그 (아키텍트로 가는 길 http://www.arload.net )
- MSDN, JCO, INETA등의 다수 세미나 스피커, Micro Software 다수기고
- 사이텍미디어 자문위원
 
Application과 Framework 동시에 구축하기
느긋하게 Framework를 설계할 시간이 있다면 얼마나 좋을까요? 하지만 현업은 우릴 그렇게 나두지 않습니다. 어떻게 해야 Framework를 사용할 수많은 Application들과 함께 협업하여 성공적으로 Framework를 구축할 수 있을까요? 7가지의 Pattern Language 행동 강령을 여러분에게 소개합니다.
고 상 원  한양대학교 객체지향 연구실
- 한양대학교 객체지향 연구실
- 데브피아 아키텍쳐 스터디 팀 EVA 소속
 
ASP.NET MVC Framework
이 세션은 ASP.NET 플랫폼 상에서 Front Controller 패턴 바탕의 웹 애플리케이션 개발을 지원하는ASP.NET MVC Framework에 대해 설명합니다. ASP.NET MVC Framework의 내부 구조와 Front Controller 패턴에 기반한 웹 애플리케이션 개발 방법을 ASP.NET MVC Framework Beta 버전을 기준으로 간단한 예제와 함께 살펴봅니다.
장 현 희  MySpace.com 한국 지사 Senior Developer
- MySpace.com 한국 지사에서 Senior Developer
- ASP/ASP.NET 분야 Microsoft MVP
- 다수의 ASP/ASP.NET 관련 도서를 집필한 저자
- DevDays 등 크고 작은 세미나에서 발표자
 
 ADO.NET Entity Framework
지금까지의. NET의 데이터액세스 어플리케이션은 데이터베이스에 접근하기 위해서 대부분 ADO.NET을 직접 이용해 왔습니다. 그리고 이 경우 원하는 데이터를 얻기까지 상당부분의 코딩이 업무로 직과는 상관없이 필요했던 것이 사실입니다. 이제 Visual Studio 2008와는 별도로 제공되는 공개 라이브러리인 ADO.NET Entity Framework를 이용하면 좀더 많은 시간을 업무구현에 활용할 수 있습니다. 데이터베이스의 테이블수준이 아닌 개념적 상위수준의 데이터 라이브러리인 ADO.NET Entity Framework을 활용하는 방법을 소개합니다.
한 용 희  Microsoft MVP, 롯데 정보 통신
- Microsoft MVP, 롯데 정보 통신
- MSDN, 데브피아 세미나 강사
- 커뮤니티 히어로상 (2008)
 
 iBastis.NET 과 Spring.NET
닷넷 기반 Application에서 Java 진영의 Framework인 Spring.NET과 iBatis.NET의 사용법을 알아보고 MVC와 Entity Framework와는 또 다른 매력을 소개합니다. iBatis.NET 세션에서는 iBatis.NET의 소개와 여타 ORM 툴과의 차이점을 설명하고 활용 예를 보여드립니다. 그리고 Spring.NET의 모듈 별 기능 소개 및 활용 전략을 여러분과 공유합니다.
권 효 중  (주)중외정보기술 근무
- (주)중외정보기술 근무
- 자카르타 스트럿츠 프로그래밍 번역 (2003, 한빛미디어)
- 자카르타-서울 프로젝트 스트럿츠팀 리드
 
사이텍미디어(지앤선)
한국마이크로소프트 ("당신을 만나고 싶습니다" Hero 블로그 지원 - http://blog.ithero.co.kr)
 
- 세미나 당일 주차는 지원되지 않습니다. 가급적이면 대중교통을 이용하여 주시기 바랍니다.
- 문 의 : 02-511-4824(#132)
해당 세미나 등록
 

반응형

Java 6 update10 에서 윈도우 Frame 투명화가 가능해졌네요.

이리저리 찾아보고 있었는데 자료를 찾았습니다. ㅎㅎ

원래 투명하게 보이는걸 좋아해서.. 내가 만든 플램도 넣고 싶었는데..

Java 라서 안되는구나.. 했는데 드디어 지원한다니 ㅋㅋ

영문 자료입니다.. 즐프 하시길..^^

How to Create Translucent and Shaped Windows

http://java.sun.com/developer/technicalArticles/GUI/translucent_shaped_windows/

The article describes a feature that allows creating applications with translucent and shaped windows.

Contents
 
Introduction
Feature Overview
 
Translucent Windows
Shaped Windows
API Overview
Using the Feature
 
Determining the Support for a Desired Effect
Making a Window Translucent
 
Setting the Opacity Level of a Window
Enabling Per-Pixel Translucency
Setting the Opacity Level of a Window
Translucent and Shaped Windows Demo
Summary
 

JavaFX Script is a capable new language that offers a set of APIs for creating RIAs. It also provides you with access to the rich features of the the standard Java language. One of the major features introduced in the Java SE 6u10 release is the ability to create translucent and shaped windows. This includes:

  • making application windows translucent (tuning the general opacity of the window and using a per-pixel translucency effect)
  • setting shapes on application windows

This feature is available for objects of the java.awt.Window class and its descendants, for example javax.swing.JFrame, javax.swing.JFDialog, java.awt.Frame.

Translucent Windows
The translucent windows capability tunes the appearance of application windows using two different effects - simple translucency and per-pixel translucency. First, we will give an overview of the simple translucency effect. The simple translucency effect is used to make a window evenly translucent. When simple translucency is applied to a window, all the pixels of the window are assigned an alpha value which determines the level of opacity from the available range. The smaller the value, the more transparent the given window becomes. The minimum opacity level provides a completely transparent window, while the maximum opacity level represents a completely non-transparent (i.e. opaque) window. The following images demonstrate the use of the effect in four cases:

Dialog window without the effect applied Evenly translucent dialog window with opacity level 85%
Figure 1. Dialog window without the effect applied
Figure 2. Evenly translucent dialog window with opacity level 85%
Evenly translucent dialog window with opacity level 45% Evenly translucent dialog window with opacity level 25%
Figure 3. Evenly translucent dialog window with opacity level 45%
Figure 4. Evenly translucent dialog window with opacity level 25%
 

The screenshots are taken from the Translucent and Shaped Windows Demo. For details, see the Demo section. For more information about the effect and its use, see Setting the Opacity Level of a Window.

Another feature new to this release is the per-pixel translucency effect. Like simple translucency, per-pixel translucency can be used to make a window evenly translucent, though it is not recommended for performance reasons. However, it also enables you to control the opacity level of each individual pixel independently in order to make the window non-uniformly translucent or transparent. A good example of the use of the per-pixel effect is a gradient effect when the opacity "strength" of the window background increases from its top to the bottom. The following images show the per-pixel translucency effect in action for two cases:

The dialog window is evenly translucent using per-pixel alpha with 50% level
A gradient effect from fully translucent (upper left corner) to fully opaque
Figure 5. The dialog window is evenly translucent using per-pixel alpha with 50% level (note that the button remains opaque)
Figure 6. A gradient effect from fully translucent (upper left corner) to fully opaque (lower right corner) has been applied to the dialog window (note that the button remains opaque)
 

Note that when the per-pixel translucency effect is applied to make a window area transparent, the area may or may not remain clickable - this is a platform dependent behavior. For more information about the effect and its use, see Enabling Per-Pixel Translucency.

To sum up, the simple translucency effect is used to make a window evenly translucent or transparent, and the per-pixel translucency effect enables you to make a window evenly or non-uniformly translucent or transparent. Both the simple translucency and the per-pixel translucency can be used to make a window evenly translucent or transparent. However, when applied, the simple translucency effect consumes fewer system resources.

Shaped Windows
The other feature introduced in release 6u10 is the window shaping effect. Using shaping you can set any shape to an undecorated window. When the effect is applied, the desired area of a window becomes transparent. Thus, the combination of transparent and non-transparent pixels form the shape of a given window. The next images demonstrate window shaping in two cases:

Oval dialog window
Rounded rectangle dialog window
Figure 7. Oval dialog window
Figure 8. Rounded rectangle dialog window
 

Note that transparent areas of the window become unclickable. For more information about the effect and its use, see Setting the Shape of a Window.

These effects can be applied in combination. For example, you can create an oval shaped translucent window or a rounded rectangle window with the gradient effect applied:

Oval evenly translucent dialog window
Rounded rectangle dialog window with the gradient effect applied
Figure 9. Oval evenly translucent dialog window
Figure 10. Rounded rectangle dialog window with the gradient effect applied
 

Note that the effects may not be supported by the underlying platform (either because of hardware or software limitations or both). Therefore, before applying the effect, make sure that the platform supports it. For more details on system support, see Determining the Support for a Desired Effect.

The translucent and shaped windows feature is available through the new com.sun.awt.AWTUtilities class.

Note: the com.sun.awt.AWTUtilities class is not part of an officially supported API and appears as an implementation detail. The API is only meant for limited use outside of the core platform. It may change drastically between update releases, and it may even be removed or be moved in some other packages or classes. The class should be used via Java Reflection. Supported and public API will appear in the next major JDK release.

Method (* all the methods in the table are public and static)
Purpose
enum Translucency
Represents the kinds of translucency supported by the underlying system
boolean isTranslucencySupported(Translucency translucencyKind)
Returns if the given level of translucency is supported by the underlying system
void setWindowOpacity(Window window, float opacity)
Sets the opacity of a window
float getWindowOpacity(Window window)
Returns the opacity of a window
Shape getWindowShape(Window window)
Returns the shape of a window
void setWindowShape(Window window, Shape shape)
Sets the shape of a window
void setWindowOpaque(Window window, boolean isOpaque)
Enables the per-pixel translucency for a window
boolean isWindowOpaque(Window window)
Returns whether the window is opaque or translucent
boolean isTranslucencyCapable(GraphicsConfiguration gc)
Verifies whether a given graphics configuration supports the per-pixel translucency
 

Determining the Support for a Desired Effect
As already mentioned, the underlying system may not support the desired effect. That is why it is necessary to perform system support validation. The simple translucency and shaping effects require only general validation which indicates whether the system supports the effect in general.

To determine whether your system supports the effect, use the AWTUtilities.isTranslucencySupported() method passing a corresponding constant value as an argument. The constants PERPIXEL_TRANSPARENT, TRANSLUCENT, PERPIXEL_TRANSLUCENT represent shaping, simple translucency, and per-pixel translucency respectively. The next example shows how to determine whether your system supports simple translucency:

if (AWTUtilities.isTranslucencySupported(AWTUtilities.Translucency.TRANSLUCENT) {
      //perform translucency operations here
}
 

The per-pixel translucency also requires a window be created using a compatible graphics configuration. To check whether the given graphics configuration supports the per-pixel translucency effect use the isTranslucencyCapable() method. The following example shows how to determine whether the default graphics configuration supports per-pixel translucency:

if ((AWTUtilities.isTranslucencySupported(AWTUtilities.Translucency.PERPIXEL_TRANSLUCENT)) &&
      (AWTUtilities.isTranslucencyCapable(defaultTranslucencyCapableGC))) {
      //perform translucency operations here
}
 

In case the default graphics configuration is not per-pixel translucency capable, you can go through all available graphics configurations and find one capable of translucency. Use the following code snippet:

GraphicsEnvironment env =
           GraphicsEnvironment.getLocalGraphicsEnvironment();
       GraphicsDevice[] devices = env.getScreenDevices();

     for (int i = 0; i < devices.length && translucencyCapableGC == null; i++) {          GraphicsConfiguration[] configs = devices[i].getConfigurations();          for (int j = 0; j < configs.length && translucencyCapableGC == null; j++) {              if (AWTUtilities.isTranslucencyCapable(configs[j])) {                  translucencyCapableGC = configs[j];              }          }      }

 

Once it has been determined that the system supports the desired effect, you can proceed to apply it to your top-level windows.

Making a Window Translucent
Setting the Opacity Level of a Window
The general opacity level of the application window is controlled by the the setWindowOpacity method. This method takes window and opacity variables as arguments. The window argument defines the window to apply the effect to. This argument must be an instance of the java.awt.Window class or its descendant, such as javax.swing.JFrame. The opacity argument is responsible for the level of opacity of the window. The lower its value, the more transparent the window becomes. The range of allowed values is [0f ; 1f]. If you set the value to 0f, the window becomes completely transparent (i.e. invisible). If the value is set to 1f, then the window becomes completely opaque (which is equal to a case when the effect is not applied at all). If the opacity level value is out of the range, it throws an IllegalArgumentException. Note that the effect can not be applied to full-screen windows. If you are in full screen windows mode and the opacity value is lower than 1f, you will get an IllegalArgumentException.

The following code snippet shows how to set the opacity level for your window. To make the window translucent, the example uses the setWindowOpacity method via Java Reflection, passing window and 0.75f as arguments. Window is an instance of the JFrame class, 0.75f is the value of the translucency.

Note that all the examples from this article that use the AWTUtilities class should be implemented via Java Reflection API.

try {
   Class<?> awtUtilitiesClass = Class.forName("com.sun.awt.AWTUtilities");
   Method mSetWindowOpacity = awtUtilitiesClass.getMethod("setWindowOpacity", Window.class, float.class);
   mSetWindowOpacity.invoke(null, window, Float.valueOf(0.75f));
} catch (NoSuchMethodException ex) {
   ex.printStackTrace();
} catch (SecurityException ex) {
   ex.printStackTrace();
} catch (ClassNotFoundException ex) {
   ex.printStackTrace();
} catch (IllegalAccessException ex) {
   ex.printStackTrace();
} catch (IllegalArgumentException ex) {
   ex.printStackTrace();
} catch (InvocationTargetException ex) {
   ex.printStackTrace();
}
 

When applied, the method makes the frame translucent with a 75% level of opacity.

To get the current opacity of a window, use the getWindowOpacity method passing a window object as its argument. If the opacity level has not yet been set, this method returns 1.0f. In case the method returns 0f, the window is completely transparent. The next code snippet shows how to get the current level of opacity of a window:

float opacity = AWTUtilities.getWindowOpacity(frame);
 

Enabling Per-Pixel Translucency
The setWindowOpaque method is used to enable per-pixel alpha support for the given window. The method takes the window and isOpaque variables as arguments. The window argument defines the window you apply the effect to. Note that the argument must represent a window created using an effect compatible graphics configuration. For more information on graphics configurations, see Determining the Support for a Desired Effect. Also note that the window must not be in full-screen mode when making it non-opaque, or an IllegalArgumentException is thrown.

The isOpaque parameter defines whether the window must be opaque (true), or translucent (false). Once the window becomes non-opaque (the isOpaque is set to false), the drawing sub-system starts to respect the alpha value of each individual pixel. If a pixel gets painted with an alpha color component equal to zero, it becomes visually transparent; if the alpha of the pixel is equal to 255, the pixel is fully opaque. Interim values of the alpha color component make the pixel semi-transparent (i.e. translucent). The following code snippet shows how to enable the per-pixel alpha support for your window.

AWTUtilities.setWindowOpaque(frame, false);
 

If invoking the getWarningString on the window object returns a non-null String, this method will not affect the opacity of the window.

The following code snippet shows how to achieve the gradient effect. It is done by defining the parameters of the JPanel component using the GradientPaint method:

jPanel1 = new javax.swing.JPanel() {
      protected void paintComponent(Graphics g) {
          if (g instanceof Graphics2D) {
              final int R = 240;
              final int G = 240;
              final int B = 240; 

            Paint p =             new GradientPaint(0.0f, 0.0f, new Color(R, G, B, 0),                 getWidth(), getHeight(), new Color(R, G, B, 255), true);             Graphics2D g2d = (Graphics2D)g;             g2d.setPaint(p);             g2d.fillRect(0, 0, getWidth(), getHeight());      } else {     super.paintComponent(g);      }    }  }

 

Then the component should be placed on the frame:

frame.add(jPanel1);
 

Setting the Shape of a Window
To apply a shape to a window use the setWindowShape method. The method uses the window argument to define the window you want to set the shape to. Additionally, it uses the shape argument to define the desired shape. The shape can be any instance of the java.awt.Shape interface, for example, Ellipse2D.Float or RoundRectangle2D.Float. The next code snippet shows how to set an oval shape on your window. In the example, the fd argument represents the JFrame window, Ellipse2D.Float creates a new instance of an Ellipse2D object that defines the shape of the window:

fd.addComponentListener(new ComponentAdapter() {
     @Override
     public void componentResized(ComponentEvent evt) {
       Shape shape = null;
       shape = new Ellipse2D.Float(0, 0, fd.getWidth(), fd.getHeight());
       AWTUtilities.setWindowShape(fd, shape);
     }
});
 

It is recommended to set the shape using the componentResized() method as this enables precise control of the shape according to the current size of the window.

When setting the shape on your window, note that the effect supports only undecorated windows. If your window is decorated and you apply the effect, you will get the original shape of the window without the effect applied to it. If the window has been created by untrusted code (i.e. the window has a non-null warning string returned by getWarningString()), the method returns without affecting the shape of the window. Also note that the window must not be in the full-screen mode when setting a non-null shape. Otherwise, an IllegalArgumentException is thrown.

To get the current value of the shape of a window, use the getWindowShape method passing a window as an argument. The getWindowShape method returns an object that implements the shape interface and represents the shape previously set . If no shape has been set yet, or the shape has been reset to null, this method returns null. In other words, the default rectangular shape is displayed when the null argument is passed. The following code demonstrates how to get the current shape of the window:

Shape currentShape = AWTUtilities.getWindowShape(frame);
 

You can see the translucency and shape features in action by running the "TranslucencyShapeDemo" example. Click the Launch button to run Demo using Java Web Start. Note that in order to start the demo you must have JDK 6u10 or later installed and properly configured on your machine. You can download release 6u10 at the java.sun.com download page.

The application enables you to choose a desired effect or a combination of effects and apply it to an undecorated dialog window. The application interface contains the following elements: a slidebar to set the level of constant alpha for the simple translucency effect from the range [0% ; 100%], three radio buttons to set the shape of a window - rectangular, with rounded corners, or oval, a check box to enable or disable the per-pixel gradient effect, Paint Gradient check box to switch the per-pixel gradient effect on and off, Display/Hide the frame and Close the Application buttons. Once the settings are defined, click the Display the frame button to display the dialog window with the desired effect applied. Note that you can also change the effect spontaneously. To do so, choose an effect type when the window is displayed, the window will automatically switch its view. The dialog window itself contains the Reshape Me button. When clicked, the window randomly changes its size and location on the desktop. To hide the dialog window, click Hide the frame, to close the application, click Close the Application button.

Launches the TranslucentShapes application

You can find the entire code for this program in ControlFrame.java, FancyFrame.java, Main.java, and AWTUtilitiesWrapper.java, all of which are packed in the TranslucentShapes NetBeans project. Note that the application uses the Java Reflection API. The Reflection mechanism is implemented through the AWTUtilitiesWrapper class. You can download the TransclucentShapes NetBeans project as a zip file.

This article provides a description of the translucent and shaped windows feature. It includes an overview, discusses the feature API, and offers practical examples. The demo attached to the article shows the use of each featured effect individually as well as the use of the effects in combination.

반응형


WinExit을 업그레이드 하였다.

WinExit 1.51v
-알람파일 미리듣기 추가(mp3)
-알람파일설정가능
-셋업파일에 알람파일 경로와 볼륨 저장(alarm.ini)
--mp3 파일 재생을위한 방안 고려
--JMF 사용하였으나 해당 사용자가 JMF 설치를 해야 작동하므로
   관련 지식이 없는 사용자의 불편함 발생.. basicplayer 엔진사용
-- basicplayer 사용시 필요 라이브러리
이전포스트 : http://pmguda.com/496

GudaSong 개발계획(알람설정 미리듣기를 활용)
-객체지향 프로그램을 위해 분석 설계부터 차근차근 시작할예정
-마인드맵으로 기본 구조 설계
MP3 파일 재생기능이 추가된것이 가장 크게 변화된 점이다.

물론 이번에 추가된 MP3 재생 기능은 따로 GudaSong 을 개발 계획임

그외에 딱히 수정한 바는 없다. 약간의 소스 수정과 정리가 있긴 했지만 객체지향을 위해

여러 패키지로 나누고 분류하고 했지만 더 난잡해진것 같다.

처음부터 설계 없이 시작한 결과여서 그런것 같다. 므튼 개인적으로 만들면서 많이 배우는거 같다.

업데이트 계획이나 진행상황은 다음에 정리할 생각이다.

+ Recent posts