improved flat graphic context and java-doc