Skip to content

api2doc/adapter4j

Repository files navigation

adapater4j

中文說明

The adapter4j is an Android library that provides some classes of java.awt and javax to be used in Andorid environment.

These classes have exactly the same names, but not from J2SE.

Motivation

Some of the libraries I develop have a major requirement which is need to be used on both desktop and Android. These libraries use J2SE classes such as Font, Color, Graphics, etc. which are part of java.awt and javax and don't exist in Android envrionment.

In order for these libraries to work well on both platforms without any modification, I create some classes which names are the same as classes in J2SE. These classes call native classes of Android environment to produce same results as calling the J2SE classes in the desktop environment.

Note: Only the classes of J2SE I use are implemented in this library, and the properties and methods are only partially implemented.

How to Use

Android Studio Project

  1. Add j2a-x.x.x.aar dependency in the build.gradle of the application.
dependencies {
    implementation(name:'j2a-0.1.1-release', ext:'aar')

    // or
    compile(name:'j2a-0.1.1-release', ext:'aar')
}
  1. Integrate with your application
Env2a.link(this);                         // Link to the your application
Env2a.configPaintAntiAliasFlag(true);     // Paint setting

About

The adapter implements some classes of java.awt, javax simply for android environment.

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Contributors 2

  •  
  •  

Languages