Java UI Factory

JAVA UI Factory - build awt/swing applications by annotations

License

License

Categories

Categories

Java Languages
GroupId

GroupId

com.github.kennycyb
ArtifactId

ArtifactId

java-ui-factory-core
Last Version

Last Version

0.4
Release Date

Release Date

Type

Type

jar
Description

Description

Java UI Factory
JAVA UI Factory - build awt/swing applications by annotations
Project URL

Project URL

https://github.com/kennycyb/java-ui-factory/
Source Code Management

Source Code Management

https://github.com/kennycyb/java-ui-factory

Download java-ui-factory-core

How to add to project

<!-- https://jarcasting.com/artifacts/com.github.kennycyb/java-ui-factory-core/ -->
<dependency>
    <groupId>com.github.kennycyb</groupId>
    <artifactId>java-ui-factory-core</artifactId>
    <version>0.4</version>
</dependency>
// https://jarcasting.com/artifacts/com.github.kennycyb/java-ui-factory-core/
implementation 'com.github.kennycyb:java-ui-factory-core:0.4'
// https://jarcasting.com/artifacts/com.github.kennycyb/java-ui-factory-core/
implementation ("com.github.kennycyb:java-ui-factory-core:0.4")
'com.github.kennycyb:java-ui-factory-core:jar:0.4'
<dependency org="com.github.kennycyb" name="java-ui-factory-core" rev="0.4">
  <artifact name="java-ui-factory-core" type="jar" />
</dependency>
@Grapes(
@Grab(group='com.github.kennycyb', module='java-ui-factory-core', version='0.4')
)
libraryDependencies += "com.github.kennycyb" % "java-ui-factory-core" % "0.4"
[com.github.kennycyb/java-ui-factory-core "0.4"]

Dependencies

compile (5)

Group / Artifact Type Version
junit : junit jar 4.12
org.jmock : jmock-junit4 jar 2.6.0
ch.qos.logback : logback-classic jar 0.9.15
cglib : cglib-nodep jar 2.2
org.apache.commons : commons-lang3 jar 3.4

Project Modules

There are no modules declared in this project.

Build Status

java-ui-factory

The Java UI Factory Library is a framework that helps create Java Swing Application easily and faster.

The library used annotations to build UI components.

Read more in docs or https://code.google.com/p/java-ui-factory

maven

Release


Snapshot

<dependencies>
	<dependency>
		<groupId>com.github.kennycyb</groupId>
		<artifactId>java-ui-factory-core</artifactId>
		<version>0.5-SNAPSHOT</version>
	</dependency>
</dependencies>

To use the snapshot, add the following to pom.xml or settings.xml

<repositories>
    <repository>
        <id>snapshots-repo</id>
        <url>https://oss.sonatype.org/content/repositories/snapshots</url>
        <releases>
            <enabled>false</enabled>
        </releases>
        <snapshots>
            <enabled>true</enabled>
        </snapshots>
    </repository>
</repositories>

java-ui-factory-ext

This project extends java-ui-factory, see java-ui-factory-ext

Features

Layouts

@UiText("Sample - SpringLayout - CompactGrid")
@UiWindowPosition(WindowPosition.CENTER)
@UiLayout(SpringLayout.class)
@UiFrameCloseOperation(FrameCloseOperation.EXIT)
@UiSpringGridConstraint(gridType = SpringGridType.COMPACT)
public class SpringLayoutCompactGridSample extends JFrame {
                                            
    private static Logger LOGGER = LoggerFactory.getLogger(SpringLayoutCompactGridSample.class);

    @UiText("Host:")
    JLabel label1;

    @UiText("127.0.0.1")
    @UiColumns(20)
    JTextField mHost;

    @UiText("Port:")
    JLabel label2;

    @UiText("21")
    @UiColumns(5)
    JTextField mPort;

    public static void main(String[] args) {
        UiFactory.instance().createComponent(SpringLayoutCompactGridSample.class).setVisible(true);
    }
}

Centralize A Window automatically annotated by with WindowPosition

@UiWindowPosition(WindowPosition.CENTER)
public class SampleComboBox extends Frame {
}

Components

Create a scrollbar automatically

@UiScrollable(horizontal = ScrollBarPolicy.ALWAYS, vertical = ScrollBarPolicy.ALWAYS)
private JTextArea content;
@UiScrollable(horizontal = ScrollBarPolicy.ALWAYS, vertical = ScrollBarPolicy.ALWAYS)
private JPanel content;

Auto Wired UI Event

private void onNotepad_windowClosing(WindowEvent e) {
    LOGGER.debug("onNotepad_windowClosing: new state={}", e.getNewState());
}

private void onNotepad_windowActivated(WindowEvent e) {
    LOGGER.debug("onNotepad_windowActivated");
}

Migrated from Google Code

This project was migrated from https://code.google.com/p/java-ui-factory

Versions

Version
0.4