When Java first came out, one of its acknowledged weaknesses was the lack of
an advanced set of GUI components. This was especially evident in the text
controls, which lacked many of the advanced features found in the native text
controls of operating systems such as Windows. With the release of the Java
Foundation Classes (also known as Swing), Java finally had a robust and
sophisticated collection of controls, especially text controls.
With this in mind, this series of articles will show how to build a simple
syntax, with emphasis on text control using Swing's Model View Controller
(MVC) architecture and JTextPane. The control will handle keyword
highlighting by changing the font style to a bold format. It will handle both
single-line ("//") and multiline ("/**/") comments by changing the style
to an italic format and the font color to a user-defined one. Strings ... (more)
Last month we discussed the use of Swing's Document model to create a
syntax-highlighting Document model that we could just plug into JTextPane and
use. This month we'll continue with that and add complete support for
comments, strings and numbers. We'll also cover how easy it is to actually
use the model we've developed, and test things out as we go along.
To start things out let's try and use what we have so far. If we look at the
code below we can see that plugging the Document we've created into a
JTextPane component is quite easy. Defining the keywords is also very easy.
JTex... (more)
When we last talked, I promised to finish up the CodeDocument class I'd so
abruptly left behind back in July (JDJ Vol. 4, issue 7). Now, due to millions
of desperate letters from fans around the globe, I've decided to finish off
the series in this article, tackling reflection once again and ending with a
text component that supports syntax highlighting and a simplified version of
something similar to Borland's Code Insight. Along the way we'll see a few
more tricks that JTextArea can do, and in general we'll just go hog wild in
code!
A Refresher on Reflection
Those of you who rea... (more)
This column discusses property editors and how to implement one for Java
-specifically, how to make one work for our CodeDocument class. When last we
talked, we saw how to build a CodeDocument class, but it wasn't something we
could work with in a visual designer like JBuilder, say, or Visual Cafe. In
this column we'll build a special case of the JTextArea component and add
some specialty properties and property editors to support the CodeDocument
class we worked on before. The code listings at the end of the article are
excerpted from the complete code, which you can download fr... (more)
I got inspired by this image:
Balrog-lord-of-the-rings-4801000-1920-1200.jpg
and made a stab at a head sculpt in Zbrush:
From Learning 3D
From Learning 3D
From Learning 3D
From Learning 3D
It will be interesting to see if I can bring it into Houdini and add the
fire, lighting and smoke there.
... (more)