http://www.flickr.com/photos/markthefotographer/
...thats it here
Sunday, May 09, 2010
Context menu in OS X to resize images
I used this link to set up an entry in the context menu for automagically resizing images in OS X.
http://davidvielmetter.com/?p=2206
I changed things around a little, since there is already a way to resize images I did not need to write a shell script using ImageMagick.
http://davidvielmetter.com/?p=2206
I changed things around a little, since there is already a way to resize images I did not need to write a shell script using ImageMagick.
New direction
I am taking this blog in a new direction. I did not want to just create a new blog because some of the information here, while not relevant to photography is important to me.
So from now on this will be used to post photography information and what I learn with my new hobby.
So from now on this will be used to post photography information and what I learn with my new hobby.
Monday, May 26, 2008
Not much going on
Just wanted to make sure all of you know that I am still alive and kicking. Not much going on in my computing life. I did leave my position at ITT April 14 and started a new job at ???. Not sure I can tell you much other than the number of question marks equal the number of letters in the name of the place..I'll let you do the math.
I did pick up an iMac a few months ago and really like it. I have a .mac account and my username is 'iammarkwebb' if you would like to check it out.
I did pick up an iMac a few months ago and really like it. I have a .mac account and my username is 'iammarkwebb' if you would like to check it out.
Sunday, February 24, 2008
Photographer site from hockey tournament
Here is a link
to the site of the photographer that took tons of pictures at Brandon's hockey tournament this weekend at Oswego.
to the site of the photographer that took tons of pictures at Brandon's hockey tournament this weekend at Oswego.
Thursday, February 14, 2008
Safe HashMap
This is a really cool class that allows for lazy initialization and removed the possibility of having null values in the HashMap. Another nice feature is that it is generics-capable.
Now if this class was thread safe, we would have a complete solution....
Now if this class was thread safe, we would have a complete solution....
Wednesday, October 03, 2007
CopyOnWriteMap
I finally got around to writing an implementation of java.util.Map, which provides a fast, concurrent way to access a Map. Write operations are more expensive, but you would only want to use this class if reading is your primary objective. I had found a few other implementations of a copy-on-write Map, but I did not think they were quite right. With some help from the MINA team, I have the class in the trunk of MINA and all is well.
Thursday, September 13, 2007
Andy McKee
This guy is simply amazing. If you appreciate music even a little, you will love what Andy Mckee
can do with a guitar. He has many of his songs on youtube, and you can also get his music on iTunes.
can do with a guitar. He has many of his songs on youtube, and you can also get his music on iTunes.
Tuesday, September 11, 2007
Abstract Dialog Class
Here is the code from a class that I have used for years. This class extends JDialog in a way that adding components to it is very painless, since it uses GridBagLayout. I hope to soon comment it better and add an example, but for now you will have to look at the code to see what is going on.
package org.markwebb.gui;
import java.awt.BorderLayout;
import java.awt.Color;
import java.awt.GridBagConstraints;
import java.awt.GridBagLayout;
import java.awt.Insets;
import java.awt.event.ActionEvent;
import java.awt.event.ActionListener;
import javax.swing.BorderFactory;
import javax.swing.JButton;
import javax.swing.JComponent;
import javax.swing.JDialog;
import javax.swing.JFrame;
import javax.swing.JPanel;
import javax.swing.border.TitledBorder;
/**
* This is an abstract class which takes many of the pains out of
* GridBagLayout. The Dialog is set to modal.
*
* @author Mark Webb
*
*/
public abstract class AbstractDialog extends JDialog implements ActionListener {
protected static final String ACCEPT = "Accept";
protected static final String CANCEL = "Cancel";
protected static final String CLOSE = "Close";
protected JPanel mainPanel;
protected GridBagConstraints c;
private int row, col;
public AbstractDialog( JFrame parent, String title, String borderTitle ){
super( parent, title, true );
setDefaultCloseOperation( JDialog.DISPOSE_ON_CLOSE );
c = new GridBagConstraints();
c.fill = GridBagConstraints.BOTH;
c.anchor = GridBagConstraints.WEST;
c.insets = new Insets(5,5,5,5);
row = 0;
col = 0;
mainPanel = new JPanel();
mainPanel.setBorder( BorderFactory.createTitledBorder(BorderFactory.createLineBorder(Color.black, 1),
borderTitle, TitledBorder.LEFT, TitledBorder.TOP ));
mainPanel.setLayout( new GridBagLayout() );
add( mainPanel, BorderLayout.CENTER );
JPanel buttons = new JPanel();
JButton accept = new JButton( ACCEPT );
accept.addActionListener( this );
buttons.add( accept );
JButton cancel = new JButton( CANCEL );
cancel.addActionListener( this );
buttons.add( cancel );
JButton close = new JButton( CLOSE );
close.addActionListener( this );
buttons.add( close );
add( buttons, BorderLayout.SOUTH );
}
public void addToRow( JComponent comp, int width ){
// add the component
addItem( col, row, width , comp );
// increment the column number
col++;
}
public void addToNewRow( JComponent comp, int width ){
// increment the row number
row++;
// reset the column number
col = 0;
// add the component
addItem( col, row, width , comp );
// increment the column number
col++;
}
private void addItem( int x, int y, int w, JComponent comp )
{
c.gridx = x;
c.gridy = y;
c.gridwidth = w;
mainPanel.add( comp, c );
}
public void actionPerformed( ActionEvent e ){
if( e.getActionCommand().equals( ACCEPT )){
doAccept();
} else if( e.getActionCommand().equals( CANCEL )){
doCancel();
} else if( e.getActionCommand().equals( CLOSE )){
doClose();
}
}
private void doClose(){
setVisible( false );
}
protected abstract void doAccept();
protected abstract void doCancel();
}
Subscribe to:
Posts (Atom)