Showing posts with label API. Show all posts
Showing posts with label API. Show all posts

akaikiwi

>> Monday, January 31, 2011

So I've been working on akaikiwi a lot lately, I took a little break now as I'm not home for a week, but I'm working on documentation and adding issues now :)
akaikiwi is a PHP MVC framework, focused on beeing lightweight and fast. It's going really nicely so far.
You can see the repo here: http://code.google.com/p/akaikiwi/
I'm working on the wiki right now, it's still kind of far from first release, but it might not take that long, it just needs some fixes, a bit new features and a lot of testing.
Once that's done, I'll consider the first release :)
For now, I'll work on the wiki, you can check it to see the nice features and how to use it so far, you can also pull it from the repo if you wanna test it. I'll list some features here.


Features

  • Very easy to learn
  • Lightweight
  • ORM
  • Very good compatibility with limited hosting accounts, works with PHP 5.2
  • Awesome performance
  • Command-line CRUD generator
  • Easy to extend
  • Debugging tools (profiling)
  • Cache
  • Simple :)

Read more...

NekoCM Utils released as Open Source!

>> Wednesday, May 5, 2010

You can now contribute to NekoCM Utils! Although I dont know if many people is interested right now ;)
I will surely have more projects later, anyways, feel free to contribute / edit / use / etc.
NekoCM Utils is released under the LGPL licence.
You can find the mercurial repository here: http://www.bitbucket.org/fedekun/nekocm-utils

Enjoy~!

Read more...

NekoCM Util - Printer

>> Wednesday, April 28, 2010

This is a little utility I'm working on. It's still under development. Basically is a simple way to print something using Java.
Normally to print something you will need to use the Print API, which is pretty annoying, so i googled and found this tutorial, it worked very good! For simple purposes is the easiest way by far.
I used it and by using it I realised I could make an API with the simple stuff I was doing, I planned on improving it later, and that would be some work because you would normally want to do that when using that tutorial source code, so I decided to do that, the result is very nice! It really helped me.
Right now the first NekoCM Util class is about printing, under the package com.blogspot.nekocm.util.print.
The idea behind that is basically make a print preview window, in the window there is a JPanel in which you draw what the page (Currently only A4 size) is gonna look like. And that's it! No worries about anything else, here is the example code.

PrintExample.java

import javax.swing.*;

import com.blogspot.nekocm.util.print.PreviewPrint;

import java.awt.*;
import java.awt.event.ActionEvent;
import java.awt.event.ActionListener;

public class PrintExample extends JFrame {
 public PrintExample() {
  super();
  this.setTitle("NekoCM - Print example");
  this.setSize(new Dimension(300, 200));
  this.setVisible(true);
  this.setLocationRelativeTo(null);
  this.setLayout(new FlowLayout());
  this.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);

  JButton btn_print = new JButton("Print");
  btn_print.addActionListener(new ActionListener() {
   @Override
   public void actionPerformed(ActionEvent arg0) {
    new PreviewPrint(new PrintExamplePanel());
   }
  });
  this.getContentPane().add(btn_print);

 }

 public static void main(String[] args) {
  try {
   UIManager.setLookAndFeel(UIManager.getSystemLookAndFeelClassName());
  } catch (Exception e) {
   // best to do nothing here
  }
  new PrintExample();
 }
}

PrintExamplePanel.java

import java.awt.Color;
import java.awt.Font;
import java.awt.Graphics2D;

import com.blogspot.nekocm.util.print.PreviewPanel;

public class PrintExamplePanel extends PreviewPanel {

 public PrintExamplePanel() {
  super("A4");
 }

 @Override
 public void paint(Graphics2D g) {
  Graphics2D g2d = (Graphics2D) g;
  g2d.setColor(Color.WHITE);
  g2d.fillRect(0, 0, this.getWidth(), this.getHeight());
  g2d.setColor(Color.BLACK);
  g2d.setFont(new Font("Arial", Font.PLAIN, 20));
  this.writeAligned(20, "center", "Neko CM", g2d);
  g2d.setFont(new Font("Arial", Font.PLAIN, 11));
  this.writeAligned(-1, "left", "\nThis is an example\n"
    + "of NekoCM Print lib", g2d);
  this.writeAligned(-1, "right", "Enjoy~", g2d);
  this.writeAligned(-1, "center", "\n\nhttp://nekocm.blogspot.com", g2d);

 }

}

That will produce something like this



You can now download the Eclipse example project or just download the api.
Hope you find this useful! I will update this as soon as I improve it, although right now I'm more into BIP (which is also improving by the way ;))

Read more...

  © Blogger template Simple n' Sweet by Ourblogtemplates.com 2009

Back to TOP