History   |   Planning   |   HTML/CSS   |   JavaScript   |   ASP   |   .Net 1.0   |   .Net 2.0   |   .Net 3.0   |   C#   |   Java   |   SQL   |   XML   |   GIS   |   Software   |   Glossary
Java
    - Dialog

    - Eclipse

    - JCreator

    - Subversion

 
Java : Dialog
Yes/No Cancel
// Confirm save
int dialogResult = JOptionPane.showConfirmDialog(
this.appViewer,
"Are you sure you want to save this sketch?",
"Save Sketch", JOptionPane.YES_NO_CANCEL_OPTION);
            
logger.debug("User Chose: " + dialogResult);

if (dialogResult == JOptionPane.YES_OPTION) {
	// Write sketch to DB                
	this.sketchTool.writeToLayerMultiple();                
	this.sketchTool.alMovePoints.clear();
	this.sketchTool.alSavedSketches.clear();
 	this.sketchTool = null;
}
else if (dialogResult == JOptionPane.NO_OPTION) {
	// Do not save
	logger.debug("User chose NO");
	this.sketchTool.alMovePoints.clear();
	this.sketchTool.alSavedSketches.clear();
	this.sketchTool = null;                
}
else {
	// Cancel
	logger.debug("User chose CANCEL");
	appViewer.getAppGui().getToolPanel().setButtonEnabled("sketch_tool", false);
	appViewer.getAppGui().getToolPanel().setButtonEnabled("sketch_tool_end", true);
}
Show Option
// Confirm save
            
// Text to put on the buttons
String[] choices = {"Enterprise", "Department A", "Cancel Save"};
            
int dialogResult = JOptionPane.showOptionDialog(
null                        // Center in window.
, "Which layer would you like to save this sketch to?"    // Message
, "Save Sketch"               // Title in titlebar
, JOptionPane.YES_NO_OPTION   // Option type
, JOptionPane.PLAIN_MESSAGE   // messageType
, null                        // Icon (none)
, choices                     // Button text as above.
, "Community"                 // Default button's label
);
            
logger.debug("Selected Save Option: " + dialogResult);
            
// Switch statement to check which button was clicked
switch (dialogResult) {
	case 0: 
		// Enterprise Layer
                    
		// Write sketch to DB        
		this.sketchTool.writeToLayerMultiple("Enterprise");                
		this.sketchTool.alMovePoints.clear();
		this.sketchTool.alSavedSketches.clear();
		this.sketchTool = null;
                    
		break;
	case 1:
		// Department A Layer
                    
		// Write sketch to DB                
		this.sketchTool.writeToLayerMultiple("Test_Treat");                
		this.sketchTool.alMovePoints.clear();
		this.sketchTool.alSavedSketches.clear();
		this.sketchTool = null;
                    
		break;
	case 2:
		// Cancel
                    
		appViewer.getAppGui().getToolPanel().setButtonEnabled("sketch_tool", false);
		appViewer.getAppGui().getToolPanel().setButtonEnabled("sketch_tool_end", true);
                    
		break;
	case -1:
		// Close box handled here
		System.exit(0);
	default:
		// If we get here, something is wrong
		JOptionPane.showMessageDialog(null, "Unexpected response " + dialogResult);
}
Jump to Top
Java : Eclipse
More Info: Sourceforge Videos
Eclipse IDE for Java Developers (85 MB)
http://www.eclipse.org/downloads/packages/
Jump to Top
Java : JCreator
JCreator is a Java IDE created by Xinox Software. Its interface is similar to that of Microsoft's Visual Studio. It is programmed entirely in C++, (with exception to the first version (0.1) which was Java-based [1] ). JCreator has two editions: Lite Edition (LE): freeware, Pro Edition (Pro): shareware that costs $89 after a 30-day trial.
JCreator.com/
Jump to Top
Java : Subversion
TortoiseSVN
http://tortoisesvn.net/downloads

To use TortoiseSVN to check out your project, open a Windows Explorer instance. Right click anywhere outside of an existing SVN tree and choose SVN Checkout.... Specify the link and the destination directory.
Jump to Top
 
Copyright © 2010 12 Bravo