mirror of
https://github.com/lacerta-doc/Lacerta.git
synced 2024-11-22 16:03:15 +00:00
メソッドの統合
This commit is contained in:
parent
d6a0dbeaa2
commit
4ae2a9fe3a
|
@ -9,8 +9,7 @@ public interface DocumentProcessor {
|
|||
// ページ操作
|
||||
void addNewPageToLast(Bitmap bitmap) throws Exception;
|
||||
void addNewPagesToLast(Bitmap[] bitmaps) throws Exception;
|
||||
void addNewPageAfterIndex(Bitmap bitmap, int index) throws Exception;
|
||||
void addNewPageBeforeIndex(Bitmap bitmap, int index) throws Exception;
|
||||
void insertPageAtIndex(Bitmap bitmap, int index) throws Exception;
|
||||
void removePageAtIndex(int index) throws Exception;
|
||||
|
||||
// 更新
|
||||
|
|
|
@ -94,7 +94,7 @@ public class DocumentProcessorImpl implements DocumentProcessor{
|
|||
}
|
||||
|
||||
@Override
|
||||
public void addNewPageAfterIndex(Bitmap bitmap, int index) throws Exception {
|
||||
public void addNewPageAtIndex(Bitmap bitmap, int index) throws Exception {
|
||||
logger.debug("addNewPageAfterIndex", "called");
|
||||
String filename = UUID.randomUUID().toString() + ".png"; // TODO-rca: 拡張子を動的にする
|
||||
|
||||
|
@ -108,22 +108,6 @@ public class DocumentProcessorImpl implements DocumentProcessor{
|
|||
lacertaVcs.insertPage(index + 1, filename);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void addNewPageBeforeIndex(Bitmap bitmap, int index) throws Exception {
|
||||
logger.debug("addNewPageBeforeIndex", "called");
|
||||
String filename = UUID.randomUUID().toString() + ".png"; // TODO-rca: 拡張子を動的にする
|
||||
|
||||
this.fileManager.getNewInstance().createDirectoryIfNotExist(DEFAULT_SAVE_DIR).resolve(DEFAULT_SAVE_DIR).saveBitmap(bitmap, filename);
|
||||
|
||||
Page page = new Page();
|
||||
page.setFileName(filename);
|
||||
page.setBitmap(bitmap);
|
||||
this.documentDetail.getPages().add(index, page);
|
||||
|
||||
lacertaVcs.insertPage(index, filename);
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
public void removePageAtIndex(int index) {
|
||||
|
||||
|
|
Loading…
Reference in New Issue
Block a user